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

How is a structure member accessed?

1062


What is a macro?

1053


Whats s or c mean?

952


Explain enumerated types.

979


Why c is called top down?

1095


What is the difference between a free-standing and a hosted environment?

1102


What is the difference between printf and scanf )?

1026


What is static and volatile in c?

1177


What is a null pointer in c?

1126


What is the difference between the local variable and global variable in c?

930


What are the benefits of c language?

1112


Is c is a low level language?

1070


What is #define size in c?

1122


Explain what is the benefit of using #define to declare a constant?

1097


What is the difference between union and structure in c?

1088