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



What will be the output of the following program #include<stdio.h> void main() { int i=..

Answer / suji

THE PROGRAM DOES NOT RETURN ANY THING.. IT WILL SHOW THE ERROR

Is This Answer Correct ?    10 Yes 2 No

What will be the output of the following program #include<stdio.h> void main() { int i=..

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

What will be the output of the following program #include<stdio.h> void main() { int i=..

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

What will be the output of the following program #include<stdio.h> void main() { int i=..

Answer / jeevitha

i-=i++ + ++i++
i-=41++
i-=42
i=20-42
i=-22

Is This Answer Correct ?    1 Yes 2 No

What will be the output of the following program #include<stdio.h> void main() { int i=..

Answer / anil kumar singh

this program depend on compiler dos turbo3 cpp
error msg:Lvalue required

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More C Interview Questions

What is selection sort in c?

1 Answers  


Do you know the difference between malloc() and calloc() function?

0 Answers  


What is the explanation for cyclic nature of data types in c?

1 Answers  


Can two or more operators such as and be combined in a single line of program code?

1 Answers  


How to run c Program without using IDE of c. means if program made in notepad.then how to compile by command prompt.

1 Answers   HP, TCS,


write a pgm to print 1 1 2 1 1 2 3 2 1 1 2 3 4 3 2 1

3 Answers  


how does printf function work

1 Answers  


pgm to find number of words starting with capital letters in a file(additional memory usage not allowed)(if a word starting with capital also next letter in word is capital cann't be counted twice)

1 Answers   Subex,


What is a segmentation fault?

2 Answers  


When a c file is executed there are many files that are automatically opened what are they files?

1 Answers  


What are the functions to open and close the file in c language?

1 Answers  


What is uint8 in c?

1 Answers  


Categories