What will be the output of
x++ + ++x?

Answer Posted / shashi shekhar

In this type of question the operation done from right side of the expression.Here we can see two types of increments pre and post increment,in post first the value assigned then increment but in pre first the value is incressed then the value assigned.

For example if x is initialized with a value
"1" then the this expression gives the output "4".

Is This Answer Correct ?    4 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain about block scope in c?

661


write a program to rearrange the array such way that all even elements should come first and next come odd

1763


Is flag a keyword in c?

682


What is #line?

611


Why is c faster?

592






What is this infamous null pointer, anyway?

611


Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.

1497


hello freinds next week my interview in reliance,nybody has an idea about it intervew questions..so tell

1673


What does *p++ do? What does it point to?

616


What is wrong with this code?

695


What is main () in c?

588


Is there any demerits of using pointer?

631


What does the message "automatic aggregate intialization is an ansi feature" mean?

694


What does sizeof int return?

594


How can I do peek and poke in c?

621