Question
#include<stdio.h>
#include<string.h>
int main()
{
printf("%c\n", "abcdefgh"[4]);
return 0;
}
What will be the output of the program ?
#include<stdio.h>
#include<string.h>
int main()
{
printf("%c\n", "abcdefgh"[4]);
return 0;
}
Answer: Option C
Was this answer helpful ?
printf("%c`setminus`n", "abcdefgh"[4]); It prints the 5 character of the string "abcdefgh".
Hence the output is 'e'.
Was this answer helpful ?
Submit Solution