Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 chain pointer in c?

1066


What does %p mean c?

1074


a parameter passed between a calling program and a called program a) variable b) constant c) argument d) all of the above

1118


What is the explanation for the dangling pointer in c?

1117


Explain high-order and low-order bytes.

1108


why do some people write if(0 == x) instead of if(x == 0)?

1083


What is the difference between int main and void main?

1051


Difference between malloc() and calloc() function?

1210


How many types of operator or there in c?

1100


What are the types of i/o functions?

1349


What are the data types present in c?

1166


Describe explain how arrays can be passed to a user defined function

1109


Describe the difference between = and == symbols in c programming?

1379


Write a program for finding factorial of a number.

1090


What should malloc() do? Return a null pointer or a pointer to 0 bytes?

1081