int a=1,b=2,c=3;
printf("%d,%d",a,b,c);
What is the output?
Answer Posted / poornima
Actually, Stack follows Last In First Out(LIFO) style.No
doubt in tht.
In code, there is only two format specifier(ie., 2 %d) tht
will corresponds to first two variables.
Elements are pushed from right to left fashion in variable
declaration part.
In stack, c is bottom-most element & a is top-most element.
so,by code a is popped first then b.so, it will print 1,2.
| Is This Answer Correct ? | 8 Yes | 4 No |
Post New Answer View All Answers
What are header files and explain what are its uses in c programming?
What will the code below print when it is executed? int x = 3, y = 4; if (x = 4) y = 5; else y = 2; printf ("x=%d, y=%d ",x,y);
Why ca not I do something like this?
Explain what is the difference between the expression '++a' and 'a++'?
How is a pointer variable declared?
Do you know the use of 'auto' keyword?
How does pointer work in c?
What does %p mean c?
When should you use a type cast?
process by which one bit patten in to another by bit wise operation is? (a) masking, (b) pruning, (c) biting, (d) chopping,
How important is structure in life?
What are the features of c languages?
int i[2], j; int *pi;i[0] = 1; i[1] = 5; pi = i; j = *pi + 1 + *(pi + 1)Value of j after execution of the above statements will be a) 7 b) 6 c) 4 d) pointer
Why c language is called c?
What is static memory allocation? Explain