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
Differentiate between the expression “++a” and “a++”?
Why do we use main function?
Describe static function with its usage?
Without Computer networks, Computers will be half the use. Comment.
What is the difference between a function and a method in c?
What is the use of in c?
Is there anything like an ifdef for typedefs?
Explain built-in function?
Are pointers really faster than arrays?
how many key words availabel in c a) 28 b) 31 c) 32
What is malloc and calloc?
What is meant by recursion?
a program that can input number of records and can view it again the record
What are operators in c?
What Is The Difference Between Null And Void Pointer?