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

Explain how are portions of a program disabled in demo versions?

1124


What 'lex' does?

1188


find the value of y y = 1.5x+3 for x<=2 y = 2x+5 for x>2

1996


What is wrong with this declaration?

1110


What are the 4 types of unions?

1046


Which of the following operators is incorrect and why? ( >=, <=, <>, ==)

1176


the number of measuring units from a arbitrary starting point in a record area or control block to some other point a) branching b) recording pointer c) none d) offset

1109


What is bash c?

1014


Which one to choose from 'initialization lists' or 'assignment', for the use in the constructor?

1089


Can you please compare array with pointer?

1096


What are keywords c?

1033


Explain how do you print an address?

1146


What is this pointer in c plus plus?

1095


What is the value of c?

1069


What is the meaning of typedef struct in c?

1072