Sail E0 Webinar
Question

What will be output if you compile following c code ?


void main()
{
char data[2][3][2]={0,1,2,3,4,5,6,7,8,9,10,11};
printf("%o",data[0][2][1]);
}


Options:
A .  5
B .  6
C .  Compile Error
D .  None of the above
Answer: Option A

%o in printf statement is used to print number in the octal format.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers