What will be the output of the following program
#include<stdio.h>
void main()
{
int i=20;
i-=i+++++i++;
printf("%d",i);
}
Answers were Sorted based on User's Feedback
Answer / suji
THE PROGRAM DOES NOT RETURN ANY THING.. IT WILL SHOW THE ERROR
| Is This Answer Correct ? | 10 Yes | 2 No |
Answer / shajitha
Answer will be 42.
i++ =20
i+++=20+
i+++++i=20+22
i+++++i++=42
| Is This Answer Correct ? | 7 Yes | 6 No |
Answer / j mahesh
i=20
i++ + ++i =20 + 21=41
i-=41
i=i-41 =20-41
i= -21
| Is This Answer Correct ? | 4 Yes | 4 No |
Answer / anil kumar singh
this program depend on compiler dos turbo3 cpp
error msg:Lvalue required
| Is This Answer Correct ? | 0 Yes | 1 No |
How can I swap two values without using a temporary?
Why we use void main in c?
What is an volatile variable?
What is the difference between ‘g’ and “g” in C?
What are the parts of c program?
`write a program to display the recomended action depends on a color of trafic light using nested if statments
Write a program to find given number is even or odd without using any control statement.
what is real time system?what is the differance between hard and soft real time systems
How to receive strings with spaces in scanf()
What is meant by gets in c?
Are pointers integer?
compute the nth mumber in the fibonacci sequence?
10 Answers Canon, HPL, Satyam, TCS,