What is the output of following program ?
int
main()
{
int x = 5;
printf("%d %d %d\n", x, x << 2, x >> 2);
}
Answer Posted / vignesh1988i
4 4 1 is the output....
here the operation of STACK involves.... for these kind of statements (ie) statements having multiple values to get printed it is used..... so the very first element that goes inside stack is x , then x<<2 , then x>>2... so from the TOP it will be operated....
and print as the order given in printf statement..... :)
thank u
| Is This Answer Correct ? | 6 Yes | 16 No |
Post New Answer View All Answers
How do you do dynamic memory allocation in C applications?
Explain the difference between exit() and _exit() function?
Why we use stdio h in c?
What is the difference between the = symbol and == symbol?
Write a c program to demonstrate character and string constants?
What is indirection? How many levels of pointers can you have?
How do you search data in a data file using random access method?
How to get string length of given string in c?
What are the different types of data structures in c?
What is adt in c programming?
What’s the special use of UNIONS?
What are 'near' and 'far' pointers?
Why are some ANSI/ISO Standard library routines showing up as undefined, even though I've got an ANSI compiler?
In c programming, explain how do you insert quote characters (? And ?) Into the output screen?
What Is The Difference Between Null And Void Pointer?