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 i;
printf("%d",((i=1)*i-- - --i*(i=-3)*i++ + ++i));

}

ans is 24 bt how?pls tell smbody............

Answer Posted / sureshb

value is 26 and i value is -2.

Intiallay i=1 is assiged.

((i=1)*i--) 1st expression = 1 postfix decrement evaluates at the end.
now i=1
--i => 0. 2nd expression

i=-3 assigned new value 3rd expression.

-3*-3 => 9 *(-3) => -27

++ post increment done at the end

-(-27) = 27.

1+ 27 =>28
now i is -3.
++i => -2;
28-2= 26.

i=-2;
post increment and decrement happens. finaaly i = -2.

Is This Answer Correct ?    5 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what is the benefit of using an enum rather than a #define constant?

1172


how to count no of words,characters,lines in a paragraph.

4380


What should malloc(0) do? Return a null pointer or a pointer to 0 bytes?

1024


What does c mean?

978


Explain 'bit masking'?

1027


What is an expression?

1003


Is c is a high level language?

1132


How is pointer initialized in c?

979


What are header files why are they important?

1047


How can I do serial ("comm") port I/O?

1133


Is javascript based on c?

1003


Explain spaghetti programming?

1191


Why is c called c not d or e?

1052


Tell me with an example the self-referential structure?

944


The postoder traversal is 7,14,3,55,22,5,17 Then ur Inorder traversal is??? please help me on this

3507