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

why 'c' is called middle level language.

2 Answers  


what is const volatile?

2 Answers  


Is main is a keyword in c?

0 Answers  


In c programming, explain how do you insert quote characters (? And ?) Into the output screen?

0 Answers  


macros and function are related in what aspect? a)recursion b)varying no of arguments c)hypochecking d)type declaration

12 Answers   HCL, Infosys, Microsoft,






Explain what does the format %10.2 mean when included in a printf statement?

0 Answers  


Write a client and server program in C language using UDP, where client program interact with the Server as given below: i) The client begins by sending a request to send a string of 8 characters or series of 7 numbers, the server sends back a characters or numbers as per the request of the client. ii) In case of series of 7 numbers: The client sends a multiplication of numbers, to the server. iii) In case of a string of 8 characters: The client sends a reverse order of string to the server.. iv) Server will send an acknowledgment to the client after receiving the correct answer

0 Answers   Ignou, Microsoft,


Which is better between malloc and calloc?

0 Answers  


write a c program to check weather a particluar bit is set or not?

5 Answers   IBM,


what is the difference between const char *p, char const *p, const char* const p

5 Answers   Accenture, Aricent, CTS, Geometric Software, Point Cross, Verizon,


What is the use of define in c?

0 Answers  


Evaluate the following: int fn(int v) { if(v==1 || v==0) return 1; if(v%2==0) return fn(v/2)+2; else return fn(v-1)+3; } for fn(7); 1) 10 2) 11 3) 1

6 Answers  


Categories