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 4 of 5.

Mohammed masood said:   1 decade ago
@Mj Taseen.

If %d is used it prints ASCII value of that character.

UmU said:   1 decade ago
@narender no you are wrong.

@samini good thnx. :).

Aju said:   6 years ago
@Bins Emmanuel.

Nice explanation, Thanks.

Bavya said:   8 years ago
Thanks for the explanation @Shabana.

Lavanya said:   1 decade ago
Thanks venky, raghu and shamini.

Kishanth said:   7 years ago
Thank you all for explaining it.

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

Sanketrjain said:   1 decade ago
Thanks raghu and shamini.

Wikiok said:   1 decade ago
myarray[5] == 5[myarray]

Gopi said:   1 decade ago
Good. Thank you.


Post your comments here:

Your comments will be displayed after verification.