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
`write a program to display the recomended action depends on a color of trafic light using nested if statments
What does 4d mean in c?
What is the difference between formatted&unformatted i/o functions?
How can I call fortran?
Why c is called free form language?
How will you write a code for accessing the length of an array without assigning it to another variable?
Explain low-order bytes.
How can I open a file so that other programs can update it at the same time?
What are the different categories of functions in c?
Write a program to print factorial of given number using recursion?
What is a pointer value and address in c?
write a c programming using command line argument,demonstrate set operation(eg;union,intersection,difference) example output is c:>setop 12 34 45 1 union 34 42 66 c:>setop 12 34 1 42 66 c:>setop 12 34 diff 12 56 67 78 setop 12 34
write a C program: To recognize date of any format even formats like "feb-02-2003","02-february-2003",mm/dd/yy, dd/mm/yy and display it as mm/dd/yy.
Can we declare function inside main?
Why is c not oop?