Answers

Question and Answer:

  Home  Aptitude

⟩ What is the output of the following C program?Main(){Printf("%c","abcdefgh"[4]);}

The answer is "e" because the value "abcdefgh" will get one index for each letter as:

a=0

b=1

c=2

d=3

e=4

f=5

g=6

h=7

And since %c is written in question der4 only one letter will be our answer... and is "e" coz its index is 4.

 262 views

More Questions for you: