16
An expression contains relational, assignment and arithmetic operators. If parenthesis are not specified, the order of evaluation of the operators would be:
Answer: Option [D]
Answer: Option [D]
Answer: Option [D]
Let us convert the given Hexadecimal number 0x001B to Decimal:
The first part is 0x160=0
The second part is 0x163+0x162+1x161+11x160 [Though B is equivalent to 11]
=27
So, 0+27=0
Now we convert the octal number 033 to decimal:
0x82+3x1+30
=27
Article and Schedule Quiz | Start Test! |
int i=0x1 << sizeof(int)*8-1; printf("\n%x",i); i=i>>sizeof(int)*8-1; printf("%d",i);
Answer: Option [B]
Answer: Option [B]
Let us test this with an example:
Let, a=20 and b=40. After swapping them a=40 and b=20
a=a+b; a=20+40=60;
b=a-b; 60-40=20;
a=a-b; 60-20=40;