Discussion :: Strings
-
What will be the output of the program ?
#include
int main() { printf("%c\n", "abcdefgh"[4]); return 0; }
Answer : Option C
Explanation :
printf("%c\n", "abcdefgh"[4]); It prints the 5 character of the string "abcdefgh".
Hence the output is 'e'.
Be The First To Comment