What is the output of following program ?
int
main()
{
int x = 5;
printf("%d %d %d\n", x, x << 2, x >> 2);
}
Answer Posted / krishna deep sharma
4,4,1
coz we shift the bit as 5=101 now shift two bit to right as
101>>2=001
now
2<<001=100
noe x=4
printf execute from right to left so ans is 4,4,1
Is This Answer Correct ? | 11 Yes | 28 No |
Post New Answer View All Answers
How can I pad a string to a known length?
What do you mean by dynamic memory allocation in c?
Explain indirection?
What is file in c language?
Can a void pointer point to a function?
What is 2c dna?
illustrate the use of address operator and dereferencing operator with the help of a program guys plzzz help for this question
What is difference between stdio h and conio h?
How can variables be characterized?
What is a keyword?
What is keyword with example?
Why is c used in embedded systems?
Want to know how to write a C program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.
if p is a string contained in a string?
What is calloc()?