main()
{
int i=400,j=300;
printf("%d..%d");
}
Answer Posted / laienjam rosan singh
In doing so, the values of i and j will be inserted into
the stack and at the time of displaying the values, LIFO
order is followed. For example in this question 400 is
inserted first and 300 second bcos i=400 is declared first.
But at the time of displaying on the screen using printf,
300 will come first as it follows LIFO. Again it is
important to note down that printf will display only the
two uppermost values in the stack in LIFO order as
default.If the code is modified as
main()
{
int i=400,j=300,k=500;
printf("%d..%d");
}
then the output is 500..300.It is because of the fact that
printf take only two uppermost values from the stack LIFO
order to be displayed on the screen.
| Is This Answer Correct ? | 11 Yes | 2 No |
Post New Answer View All Answers
What is the return type of sizeof?
c language interview questions & answer
a character or group of characters that defines a register,or a part of storage a) memory b) byte c) address d) linear list
What is multidimensional arrays
Why do we use int main?
What are called c variables?
What should malloc(0) do? Return a null pointer or a pointer to 0 bytes?
PROGRAM TO WRITE CONTENTS OF 1 FILE IN REVERSE TO ANOTHER FILE,PROGRAM TO COPY 1 FILE TO ANOTHER BY SPECIFYING FILE NAMES AS COMMAND LINE
What is meant by realloc()?
Where are the auto variables stored?
What is identifiers in c with examples?
What is bubble sort in c?
What does it mean when a pointer is used in an if statement?
Is the exit() function same as the return statement? Explain.
How can I insert or delete a line (or record) in the middle of a file?