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
Create a structure to specify data on students as given below: Roll number, Name, Department, Course, and Year of joining. Assume that there are not more than 450 students in the collage. (a) Write a function to print the names of all students who joined in the last 3 years. (b) Write a function to print the data of a student whose roll numbers are divisible by 4.
How do we open a binary file in Read/Write mode in C?
If one class contains another class as a member, in what order are the two class constructors called a) Constructor for the member class is called first b) Constructor for the member class is called second c) Only one of the constructors is called d) all of the above
Explain what is wrong in this statement?
Explain continue keyword in c
What is linear search?
What are c header files?
Explain the difference between #include "..." And #include <...> In c?
What is array in c with example?
writ a program to compare using strcmp VIVA and viva with its output.
What language is c written?
Explain modulus operator.
What are qualifiers in c?
Multiply an Integer Number by 2 Without Using Multiplication Operator
What do the functions atoi(), itoa() and gcvt() do?