what is the output of the following code?
main()
{
int I;
I=0x10+010+10;
printf("x=%x",I);
}
give detailed reason
Answer Posted / kartik
Output of this program is 22
reason is :
0x10 is hexadecimal value which is equal to 16 in decimal.
010 is octal value which is equal to 8 in decimal
10 is decimal value
so total is 16+8+10= 34
I value is 34.
Note:The person above me has given the corrst infm however the output is 34.
Try and run the program in C Compiler
| Is This Answer Correct ? | 12 Yes | 7 No |
Post New Answer View All Answers
What is the difference between the expression “++a” and “a++”?
Explain what is a program flowchart and explain how does it help in writing a program?
How can I access an I o board directly?
What is meant by type specifiers?
What is meant by recursion?
Explain what are run-time errors?
What is the difference between array and pointer?
A collection of functions,calls,subroutines or other data a) library b) header files c) set of files d) textfiles
What is include directive in c?
What are the different properties of variable number of arguments?
List some applications of c programming language?
Why is sprintf unsafe?
Where are c variables stored in memory?
what are enumerations in C
What is the scope of static variable in c?