what is the output of the following code?
main()
{
int I;
I=0x10+010+10;
printf("x=%x",I);
}
give detailed reason
Answer Posted / yogesh bansal
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.
Now we are printing the value of I on hexadecimal using %x
34 is equal to 0x22 in hexadecimal.
so the output is 22 in hexadecimal
Hope its is clear to you
| Is This Answer Correct ? | 70 Yes | 8 No |
Post New Answer View All Answers
Suppose we have a table name EMP as below. We want to perform a operation in which, I want to change name ‘SMITH’ from as ‘SMITH JAIN’. Also I want to change the name of the column from ENAME to E_NAME. EMPNO ENAME JOB MGR HIREDATE SAL 7369 SMITH Coder 7902 17-DEC-80 800 7499 ALLEN SALESMAN 7698 20-FEB-81 1600 7521 WARD SALESMAN 7698 22-FEB-81 1250
exit () is used to a) exit () terminates the execution of the program itself b) exit () terminates the execution of the loop c) exit () terminates the execution of the block d) none of the above
Explain how are 16- and 32-bit numbers stored?
How can I delete a file?
Is linux written in c?
What is 2 d array in c?
What is define directive?
What are the rules for the identifier?
Explain with the aid of an example why arrays of structures don’t provide an efficient representation when it comes to adding and deleting records internal to the array.
Linked lists -- can you tell me how to check whether a linked list is circular?
Is it valid to address one element beyond the end of an array?
how to print the character with maximum occurence and print that number of occurence too in a string given ?
When should I declare a function?
What is local and global variable in c?
Is c procedural or object oriented?