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 array and linked list in c?
What is the importance of c in your views?
What is bubble sort in c?
Why cant I open a file by its explicit path?
Explain how can you tell whether two strings are the same?
how many key words availabel in c a) 28 b) 31 c) 32
Write a factorial program using C.
What language is lisp written in?
What are unions in c?
Explain how can you determine the size of an allocated portion of memory?
Why is it important to memset a variable, immediately after allocating memory to it ?
write a program to print data of 5 five students with structures?
What is the difference between fread buffer() and fwrite buffer()?
Difference between goto, long jmp() and setjmp()?
What are the advantages of Macro over function?