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

Answer Posted / prem

if x=3
y=x++ + ++x;
y will be 8
x will be 5

calculating y part
1) x++ is 3 and x will be 4
2)++x is 5 bcz x is incremented then assigned so x=5

so y finally gives 8.

Is This Answer Correct ?    4 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

to print the salary of an employee according to follwing calculation: Allowances:HRA-20% of BASIC,DA-45% of BASIC,TA-10%. Deductions:EPF-8% of BASIC,LIC-Rs.200/-Prof.Tax:Rs.200/- create c language program?

1573


I just typed in this program, and it is acting strangely. Can you see anything wrong with it?

563


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

614


Why main is used in c?

589


1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321

3144






design and implement a data structure and performs the following operation with the help of file (included 1000 student marks in 5 sub. and %also) 1.how many students are fail in all 5 subjects (if >35) 2. delete all student data those are fail in all 5 subjects. 3. update the grace marks (5 no. if exam paper is 100 marks) 4. arrange the student data in ascending order basis of marks. 5.insert double of deleted students with marks in the list.

1497


What is the condition that is applied with ?: Operator?

665


What are the advantage of c language?

554


Does c have enums?

602


how can i write a program that prints out a box such that whenever i press any key8(coordinate number) on the keyboard, the box moves.

1214


What is a union?

611


Does c have an equivalent to pascals with statement?

574


What is the difference between the expression “++a” and “a++”?

650


Explain the use of keyword 'register' with respect to variables.

590


What is difference between union and structure in c?

578