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 C program that will accept a hexadecimal number as input and then display a menu that will permit any of the following operations to be carried out: Display the hexadecimal equivalent of the one's complement. (b) Carry out a masking operation and then display the hexadecimal equivalent of the result. (c) Carry out a bit shifting operation and then display the hexadecimal equivalent of the result. (d) Exit. If the masking operation is selected, prompt the user lor the type of operation (bitwise and, bitwise exclusive or, or bitwise or) and then a (hexadecimal) value for the mask. If the bit shifting operation is selected. prompt the user for the type of shift (left or right), and then the number of bits. Test the program with several different (hexadecimal) input values of your own choice.
What would happen to X in this expression: X += 15; (assuming the value of X is 5)
Which header file is used for clrscr?
Explain what is meant by high-order and low-order bytes?
Explain how do you search data in a data file using random access method?
What is dynamic memory allocation?
Explain the array representation of a binary tree in C.
Can a variable be both static and volatile in c?
Why doesnt this code work?
Why void is used in c?
Write program to remove duplicate in an array?
"C" language developed by "Dennis Ritchie" at AT & T. his remarks are a) too general, too abstract b) could deal with only specific problems c) lost generality of BCPL and B restored d) no remarks
How can you increase the size of a statically allocated array?
Differentiate between the expression “++a” and “a++”?
What is a void pointer? When is a void pointer used?