C Programming - Pointers - Discussion

Discussion Forum : Pointers - Find Output of Program (Q.No. 15)
15.
What will be the output of the program ?
#include<stdio.h>

int main()
{
    printf("%c\n", 7["IndiaBIX"]);
    return 0;
}
Error: in printf
Nothing will print
print "X" of IndiaBIX
print "7"
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
43 comments Page 5 of 5.

Chandana said:   7 years ago
Thanks everyone for explaining.
(1)

Mounisha said:   7 years ago
["IndiabiX"].

0-I
1-n
2-d
3-i
4-a
5-b
6-i
7-X
7["IndiabiX"]= it prints X.
(7)

Aju said:   6 years ago
@Bins Emmanuel.

Nice explanation, Thanks.


Post your comments here:

Your comments will be displayed after verification.