What will be the output of the following program
#include<stdio.h>
void main()
{
int i=20;
i-=i+++++i++;
printf("%d",i);
}

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain how do you generate random numbers in c?

626


Does c have an equivalent to pascals with statement?

572


What is int main () in c?

624


How do c compilers work?

609


Write a program in c to replace any vowel in a string with z?

693






Is null equal to 0 in sql?

653


Explain what is the benefit of using an enum rather than a #define constant?

722


4. main() { int c=- -2; printf("c=%d",c); }

1366


Differentiate between #include<...> and #include '...'

617


Write the test cases for checking a variable having value in range -10.0 to +10.0?

1816


How arrays can be passed to a user defined function

579


Explain what is the difference between a free-standing and a hosted environment?

635


For what purpose null pointer used?

606


Which is not valid in C a) class aClass{public:int x;}; b) /* A comment */ c) char x=12;

611


Why c is called free form language?

570