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
Explain what are multibyte characters?
What is function definition in c?
What is pragma c?
Is sizeof a keyword in c?
Should I learn c before c++?
What is difference between scanf and gets?
What is the sizeof () a pointer?
the factorial of non-negative integer n is written n! and is defined as follows: n!=n*(n-1)*(n-2)........1(for values of n greater than or equal to 1 and n!=1(for n=0) Perform the following 1.write a c program that reads a non-negative integer and computes and prints its factorial. 2. write a C program that estimates the value of the mathematical constant e by using the formula: e=1+1/!+1/2!+1/3!+.... 3. write a c program the computes the value ex by using the formula ex=1+x/1!+xsquare/2!+xcube/3!+....
How to Throw some light on the splay trees?
A character flag or control mechanism that delineates one data item from another a) variable b) constant c) delimiter d) call by reference
What are structures and unions? State differencves between them.
What is volatile variable in c?
What is scope rule in c?
What header files do I need in order to define the standard library functions I use?
What does the error 'Null Pointer Assignment' mean and what causes this error?