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

I might agree with ANS #1 because side effects are
involved..The expected answer might not be getting always
although in case of printf(), the arguments are evaluated
from RTL. For example consider the case

int i=10;
printf("%d %d %d %d",i++,--i,i--,--i);
Try some variations of these and and find out whether you
are able to get correctly or not..
In case the result depends on the compiler,for
verification,I will add what my compiler gave me
ANS:7 8 9 8
If anyone find out,pls reply.. Keen to know..

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between the = symbol and == symbol?

1129


What is indirection? How many levels of pointers can you have?

1152


What is signed and unsigned?

1068


int i=10; printf("%d %d %d", i, i=20, i);

1627


What are disadvantages of C language.

1168


What are the differences between Structures and Arrays?

1220


Differentiate fundamental data types and derived data types in C.

1037


how can I convert a string to a number?

1087


Can a program have two main functions?

1135


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

1836


What are pointers? What are stacks and queues?

1158


what is the difference between 123 and 0123 in c?

1209


Describe the order of precedence with regards to operators in C.

1051


What are structures and unions? State differencves between them.

1184


Why is C language being considered a middle level language?

1135