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

Describe the modifier in c?

1144


What is string function in c?

1049


what does static variable mean?

1165


Explain argument and its types.

1114


What is difference between class and structure?

1157


How can I read in an object file and jump to locations in it?

1071


What is structure padding in c?

1187


Is python a c language?

1055


Why we write conio h in c?

1078


How do I get an accurate error status return from system on ms-dos?

1177


What does s c mean in text?

1146


c program to compute AREA under integral

2466


What is const keyword in c?

1218


What are the functions to open and close file in c language?

1260


What is the difference between if else and switchstatement

2003