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
Why c is procedure oriented?
What is typedef example?
Tell me what are bitwise shift operators?
Write a program to check whether a number is prime or not using c?
using only #include
What is wrong in this statement?
What is ambagious result in C? explain with an example.
What is the significance of scope resolution operator?
Write a program in c to replace any vowel in a string with z?
What is union and structure in c?
What is table lookup in c?
Can you explain what keyboard debouncing is, and where and why we us it? please give some examples
C language questions for civil engineering
Write a program in "C" to calculate the root of a quadratic equation ax^2+bx+c=0, where the value of a,b & c are known.
Which is better pointer or array?