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 / vivers

There are two different questions..
in which its asking the result for

1)(i++ + ++i)
answer will be---> 12
"as addition will takes place from left to right
step1: i++ = 5;
step2: value of i will be updated before taking value of
another operand and hence i = 6;
step3: ++i = 7 as first increment will happen and then value
will be used.
final result: 5 + 7 = 12"

2) (i+++++i)
answer will be---> compile error
"because illegal combination of operators"


best of luck...

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can I remove the leading spaces from a string?

1096


how to find anagram without using string functions using only loops in c programming

3134


Write a program to check whether a number is prime or not using c?

1009


What is character set?

1118


How to write a multi-statement macro?

989


What is the difference between #include

and #include “header file”?

969


Explain pointers in c programming?

1063


What is getch c?

1242


What is queue in c?

1033


Explain how can you avoid including a header more than once?

1041


How can I manipulate strings of multibyte characters?

1077


Can we add pointers together?

999


What is a sequential access file?

1093


What are near, far and huge pointers?

1012


Write program to remove duplicate in an array?

1025