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 meant by keywords in c?

619


What is the difference between far and near in c?

604


How can I split up a string into whitespace-separated fields?

572


can we have joblib in a proc ?

1657


Find duplicates in a file containing 6 digit number (like uid) in O (n) time.

2611






What does typedef struct mean?

663


explain what is an endless loop?

612


Explain how do you generate random numbers in c?

627


Is javascript written in c?

585


What is c preprocessor mean?

796


write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.

2270


What is an expression?

659


When should you use a type cast?

594


Is it valid to address one element beyond the end of an array?

676


Is c easier than java?

572