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


Please Help Members By Posting Answers For Below Questions

What is c programing language?

608


What’s the special use of UNIONS?

648


What is action and transformation in spark?

585


What are the __date__ and __time__ preprocessor commands?

561


What should malloc() do? Return a null pointer or a pointer to 0 bytes?

611






What are the advantages of using new operator as compared to the function malloc ()?

744


Explain can the sizeof operator be used to tell the size of an array passed to a function?

585


If the size of int data type is two bytes, what is the range of signed int data type?

581


What is dynamic memory allocation?

796


What is use of integral promotions in c?

654


What is the use of in c?

566


How do you define a function?

577


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 “****”.

2640


What are the loops in c?

587


What are qualifiers in c?

562