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=5;
printf("%d%d%d%d",i++,i--,i);
}

Answer Posted / sravankumar

printf() function evaluates from right to left

printf("\n %d %d %d",i++,i--,i);
4 5 5
<- <- <- <- <-evaluation of expression
but prints as the way we mentioned in printf() function
i.e first i = 5
then i--= 5 because it is post decrement
then i++= 4 this because i is decremented in above, and
not incremented immediately because is post
increment
So output is : 4 5 5

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can I handle floating-point exceptions gracefully?

1108


How can you access memory located at a certain address?

1062


Why calloc is better than malloc?

973


Is this program statement valid? INT = 10.50;

1083


Explain union. What are its advantages?

1008


I have a varargs function which accepts a float parameter?

997


What are the types of bitwise operator?

1048


Explain what is page thrashing?

1053


What is pass by reference in c?

1146


Write a program for finding factorial of a number.

1032


What is a good data structure to use for storing lines of text?

1033


What is the usage of the pointer in c?

1043


A global variable when referred to in another file is declared as this a) local variable b) external variable c) constant d) pointers

1117


What are the basic data types associated with c?

1220


List some of the static data structures in C?

1156