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
How do I get a null pointer in my programs?
Explain what is a const pointer?
What are valid operations on pointers?
In C programming, how do you insert quote characters (‘ and “) into the output screen?
Write a program to implement queue.
How can you pass an array to a function by value?
Why c language?
Explain what is wrong with this program statement?
Why is c called a mid-level programming language?
What will the code below print when it is executed? int x = 3, y = 4; if (x = 4) y = 5; else y = 2; printf ("x=%d, y=%d ",x,y);
When is a null pointer used?
what is the diffrenet bettwen HTTP and internet protocol
How do you do dynamic memory allocation in C applications?
Why clrscr is used after variable declaration?
What is the general form of function in c?