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",++i + i);

} output is 10

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

}output is 12
why it is so? give appropiate reason....

Answer Posted / ashi smita

in first program i is post increment than i=5 and i=5+5=10
than i is increment by 1 and the value of i is 6 but second
program first i is preincrement by 1 and the value of is 6
than sum of i is 12.

Is This Answer Correct ?    3 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between break and continue?

1534


i have to apply for the rbi for the post of officers. i need to know abt the entrance questions whether it may be aps or techinical....

1980


What is selection sort in c?

1104


List the different types of c tokens?

1076


What are header files why are they important?

1096


what is ur strangth & weekness

2436


What is echo in c programming?

1031


What is difference between far and near pointers?

1045


Explain built-in function?

1146


If errno contains a nonzero number, is there an error?

1379


Explain what math functions are available for integers? For floating point?

1117


Can we change the value of #define in c?

1001


int main() { Int n=20,i; For(i=0;i<=n;i--) { Printf(“-“); Return 0;

1836


write a c program in such a way that if we enter the today date the output should be next day's date.

2197


How can I sort a linked list?

1049