what is output of the following statetment?Printf(“%x”,
-1<<4); ?
Answer Posted / ranjith
-1 is stored as '1' 32 times [i.e. ffffffff], doing a left
shift 4 times results in '1' 28 times followed by 4 zeros.
[i.e. in hexadecimal ffffffff0].
Therefore the output for the above printf is fffffff0.
Thanks,
Ranjith
| Is This Answer Correct ? | 5 Yes | 6 No |
Post New Answer View All Answers
Explain why can’t constant values be used to define an array’s initial size?
Can we change the value of #define in c?
Explain how do you search data in a data file using random access method?
What are the advantages of the functions?
Do you know the purpose of 'register' keyword?
What do the functions atoi(), itoa() and gcvt() do?
Explain how do you convert strings to numbers in c?
Do you know the difference between malloc() and calloc() function?
pierrot's divisor program using c or c++ code
Can you write the function prototype, definition and mention the other requirements.
What is the Purpose of 'extern' keyword in a function declaration?
define string ?
What does 4d mean in c?
What is restrict keyword in c?
Why is c called a mid-level programming language?