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 ?    10 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a pointer on a pointer in c programming language?

609


What is d scanf?

580


What is function what are the types of function?

552


What does 3 mean in texting?

602


What is pointer to pointer in c language?

583






FORMATTED INPUT/OUTPUT functions are a) scanf() and printf() b) gets() and puts() c) getchar() and putchar() d) all the above

613


write a program for the normal snake games find in most of the mobiles.

1776


what is different between auto and local static? why should we use local static?

630


1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. The Logic should be written in Data Structures?

1904


Is c pass by value or reference?

584


What are the different types of control structures?

576


What is extern keyword in c?

632


What is data structure in c language?

595


How can you invoke another program from within a C program?

609


What are external variables in c?

536