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 data types?
Explain what is the difference between functions abs() and fabs()?
Which is best book for data structures in c?
What is the difference between far and near in c?
Write a program to print ASCII code for a given digit.
What is the sizeof () a pointer?
When the macros gets expanded?
What is external variable in c?
What are the features of the c language?
How to write a code for reverse of string without using string functions?
What is calloc() function?
find the value of y y = 1.5x+3 for x<=2 y = 2x+5 for x>2
What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
On most computers additional memory that is accessed through an adapter of feature card along with a device driver program. a) user memory b) conventional memory c) expandedmemory d) area
How we can insert comments in a c program?