Q. What will be the output of the following C code?
Code:#include <stdio.h>
int main()
{
int a,b,c;
a=0x10; b=010;
c=a+b;
printf("%d",c);
return 0;
}
β
Correct Answer: (B)
24
Explanation: 0x10 is hex value it's decimal value is 16 and 010 is an octal value it's decimal value is 8, hence answer will be 24.