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
What is scope rule in c?
What are the 5 types of inheritance in c ++?
What is d'n in c?
write a program to print data of 5 five students with structures?
What is optimization in c?
Explain the use of #pragma exit?
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.
Explain what would happen to x in this expression: x += 15; (assuming the value of x is 5)
How do I create a directory? How do I remove a directory (and its contents)?
What is #define in c?
What do you mean by c what are the main characteristics of c language?
What is the Purpose of 'extern' keyword in a function declaration?
Explain how can I make sure that my program is the only one accessing a file?
Can you please explain the difference between malloc() and calloc() function?
Why is #define used?