Sail E0 Webinar
Question


What is the output of this program?


1.
#include
2.
int main()
3.
{
4.
char a = '\012';
5.
6.
printf("%d", a);
7.
return 0;
8.
}
Options:
A .  Compiler error
B .  12
C .  10
D .  Empty
Answer: Option C

The value '`setminus`012' means the character with value 12 in octal, which is decimal 10.




Was this answer helpful ?
Next Question

Submit Solution

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

Latest Videos

Latest Test Papers