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...


main()
{
int x=10,y=15;
x=x++;
y=++y;
printf("%d %d\n",x,y);
}

output??

Answer Posted / shruti

the ans is 11 and 16..

y = ++y;

wont make any differance as a statement.

we will have to think about it only if we are using it in
loops.. or conditional statements etc.. :-)

so dont get confused.
dont forget ur basics..

C is a procedural language.
hence

x = x++;
will be completely executed first
the value of x = 11.

and then

y = ++y;
will be executed and value will be changed to 16

Is This Answer Correct ?    11 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

C program execution always begins with a) #include b) comment (/*-------*/) c) main() d) declaration instructions

1054


Explain the difference between getch() and getche() in c?

997


What is the use of in c?

1026


What is c language in simple words?

1068


program for reversing a selected line word by word when multiple lines are given without using strrev

2479


What is n in c?

1042


What is string function c?

1023


Explain bit masking in c?

1139


Does sprintf put null character?

1043


What are structure members?

1092


#define f(g,h) g##h main O int i=0 int var=100 ; print f ("%d"f(var,10));} wat would be the output??

1954


what are the facialities provided by you after the selection of the student.

2256


What does node * mean?

1214


What is data structure in c and its types?

1071


What is echo in c programming?

1022