Home » C Programming » Strings

What will be the output of the program? #include #include int main() { printf("%c\n", "abcdefgh"[4]); return 0; }

Correct Answer: e

Explanation:

printf("%c\n", "abcdefgh"[4]); It prints the 5 character of the string "abcdefgh".


Hence the output is 'e'.


← Previous Question Next Question→

More Questions from Strings

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion