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

Answer Posted / ravinder

Ans 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;

Is This Answer Correct ?    24 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is scope rule in c?

603


What are the 5 types of inheritance in c ++?

576


What is d'n in c?

630


write a program to print data of 5 five students with structures?

1604


What is optimization in c?

562






Explain the use of #pragma exit?

694


Write the program with at least two functions to solve the following problem. The members of the board of a small university are considering voting for a pay increase for their 10 faculty members. They are considering a pay increase of 8%. Write a program that will prompt for and accept the current salary for each of the faculty members, then calculate and display their individual pay increases. At the end of the program, print the total faculty payroll before and after the pay increase, and the total pay increase involved.

2644


Explain what would happen to x in this expression: x += 15; (assuming the value of x is 5)

805


How do I create a directory? How do I remove a directory (and its contents)?

600


What is #define in c?

615


What do you mean by c what are the main characteristics of c language?

564


What is the Purpose of 'extern' keyword in a function declaration?

649


Explain how can I make sure that my program is the only one accessing a file?

618


Can you please explain the difference between malloc() and calloc() function?

611


Why is #define used?

788