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 volatile variable how do you declare it?
What is function and its example?
Is swift based on c?
Why calloc is better than malloc?
What is wrong with this statement? Myname = 'robin';
What is the use of function in c?
Explain which of the following operators is incorrect and why? ( >=, <=, <>, ==)
How do you convert a decimal number to its hexa-decimal equivalent.Give a C code to do the same
void main(int n) { if(n==0) return; main(--n); printf("%d ",n); getch(); } how it work and what will be its output...............it any one know ans plz reply
How many types of operators are there in c?
Where is c used?
what do you mean by inline function in C?
Can we replace the struct function in tree syntax with a union?
Explain what is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?
provide an example of the Group by clause, when would you use this clause