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
What is c programing language?
What’s the special use of UNIONS?
What is action and transformation in spark?
What are the __date__ and __time__ preprocessor commands?
What should malloc() do? Return a null pointer or a pointer to 0 bytes?
What are the advantages of using new operator as compared to the function malloc ()?
Explain can the sizeof operator be used to tell the size of an array passed to a function?
If the size of int data type is two bytes, what is the range of signed int data type?
What is dynamic memory allocation?
What is use of integral promotions in c?
What is the use of in c?
How do you define a function?
Create a registration form application by taking the details like username, address, phone number, email with password and confirm password (should be same as password).Ensure that the password is of 8 characters with only numbers and alphabets. Take such details for 3 users and display the details. While taking input password must appear as “****”.
What are the loops in c?
What are qualifiers in c?