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

What is context in c?

980


in linking some of os executables are linking name some of them

2204


How can a process change an environment variable in its caller?

1239


What are run-time errors?

1180


What is meant by preprocessor in c?

1083


List a few unconditional control statement in c.

1032


Differentiate between static and dynamic modeling.

1191


What is the purpose of void in c?

1114


How do you declare a variable that will hold string values?

1232


Explain what are multibyte characters?

1258


What does %d do in c?

1014


What does s c mean in text?

1153


What is the main difference between calloc () and malloc ()?

1242


Is c still relevant?

1141


Function which gives a pointer to a binary trees const an integer value at each code, return function of all the nodes in binary tree.?

1136