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...

what is the output for this question:
main()
{
int i=1;
printf("%d%d%d",i,i++,++i);
}

Answer Posted / r.aruna

answer is 3,2,2
because print the value form right to left.
so,the first one ++i means preincrement.
so,incremented one,2
second one is i++ means postincrement .
it doesn't increment store in same location
but next i means 3.because move to next location

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Under what circumstances does a name clash occur?

1222


why do some people write if(0 == x) instead of if(x == 0)?

1089


Write a program that takes a 5 digit number and calculates 2 power that number and prints it(should not use big integers and exponential functions)

6884


If a variable is a pointer to a structure, then which operator is used to access data members of the structure through the pointer variable?

1272


What is the right type to use for boolean values in c? Is there a standard type? Should I use #defines or enums for the true and false values?

1067


how to capitalise first letter of each word in a given string?

1937


Explain what is the benefit of using #define to declare a constant?

1202


Is flag a keyword in c?

1166


Why we use stdio h in c?

1052


What does the message "automatic aggregate intialization is an ansi feature" mean?

1200


Why is not a pointer null after calling free? How unsafe is it to use (assign, compare) a pointer value after it is been freed?

1146


Can a function argument have default value?

1165


The file stdio.h, what does it contain?

1174


Why we use void main in c?

1185


Where does the name "C" come from, anyway?

1180