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

void main()
{
int i=5;
printf("%d",i++ + ++i);
}

Answer Posted / koushik ramesh

this program output is 12.

first is i++ is 5 only because this the post increment
first using the value after increment.

whenever i++ + the value of is 6.
++ i means this is the pre-increment.first increment
the value after using the variable this step i will become
7.
total is i++ =5
i++ + =6
++ i=7
i++ + ++i= 12. this is posted by Ramesh(MCA)Nizam
college.HYDERABAD

Is This Answer Correct ?    6 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a program to reverse a given number in c language?

1164


Are pointers integers in c?

1123


Do you know pointer in c?

1109


What is an identifier?

1087


Which one to choose from 'initialization lists' or 'assignment', for the use in the constructor?

1135


How can I insert or delete a line (or record) in the middle of a file?

1069


Why flag is used in c?

1181


Why is %d used in c?

1061


Are comments included during the compilation stage and placed in the EXE file as well?

1127


Can a file other than a .h file be included with #include?

1219


What is the right type to use for boolean values in c?

1086


Is array name a pointer?

1079


Calculate the weighted average of a list of n numbers using the formula xavg = f1x1+f2x2+ ….+ fnxn where the f’s are fractional weighting factors, i.e., 0<=fi<1, and f1+f2+….+fn = 1

4365


What Is The Difference Between Null And Void Pointer?

1334


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

1235