WHAT WILL BE OUTPUT OF BELOW CODE . . AND PLEASE EXPLAIN HOW
IT COME ..

#include<stdio.h>
#include<conio.h>
void main()
{
int k=20;
printf("%d%d%d%d",k,k++,++k,k);
getch();
}

Answer Posted / vignesh1988i

22 21 21 20 THIS WILL THE OUTPUT..

this is merely an STACK operation.... here we have 4
parameters.. so the four parameters will be pushed inside
the stack one by one... as

TOP : k
++k
k++
BOTTOM : k

so the expressions will be evaluated from the top.. and thus
the answer....


thank u

Is This Answer Correct ?    9 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is else if ladder?

610


What are logical errors and how does it differ from syntax errors?

661


Differentiate call by value and call by reference?

569


What are different storage class specifiers in c?

618


What is chain pointer in c?

603






What is the value of h?

593


What is adt in c programming?

611


What’s a signal? Explain what do I use signals for?

611


What is return in c programming?

517


Explain what is the difference between functions getch() and getche()?

608


Can we change the value of #define in c?

586


I completed my B.tech (IT). Actually I want to develop virtual object that which will change software technology in the future. To develop virtual object what course I have to take. can I any professor to help me.

1740


What is a const pointer?

638


process by which one bit patten in to another by bit wise operation is? (a) masking, (b) pruning, (c) biting, (d) chopping,

1893


What is struct node in c?

622