printf("%c","abcdefgh"[4]);
The output of the following program is e. But I don’t know how it is? I searched a lot in google and here but didn’t find the correct explanation for this code. The explanation I am getting for this code:
“This is for getting one
charonly. i.e, the 4thcharstarts from0. So the answer is'e'“.
String literals are arrays, and as such can be indexed into:
"abcdefgh"[0]is'a', for example.