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

What does the && operator do in a program code?

1158


Once I have used freopen, how can I get the original stdout (or stdin) back?

1029


What are the modifiers available in c programming language?

1173


What is the value of h?

987


Explain threaded binary trees?

1105


How can I recover the file name given an open stream or file descriptor?

1029


write a progrmm in c language take user interface generate table using for loop?

1995


What is getch c?

1241


Write a program to know whether the input number is an armstrong number.

1072


What are the types of operators in c?

1001


Write a code to determine the total number of stops an elevator would take to serve N number of people.

1187


Not all reserved words are written in lowercase. TRUE or FALSE?

1180


Can a variable be both static and volatile in c?

973


How can I dynamically allocate arrays?

1036


What is an auto keyword in c?

1044