#include<stdio.h>
int main()
{
int i=2;
int j=++i + ++i + i++;
printf("%d\n",i);
printf("%d\n",j);
}

Answer Posted / ashok reddy

intially i=2
j=++i + ++i + i++;
in this statament it calculates from r-l
so j=5+4+2
and the last value of i is 5
so i=5 and j=11
is the correct answer

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Do string constants represent numerical values?

1014


Difference between malloc() and calloc() function?

753


What does the file stdio.h contain?

696


How can I prevent another program from modifying part of a file that I am modifying?

703


A function can make the value of a variable available to another by a) declaring the variable as global variable b) Passing the variable as a parameter to the second function c) Either of the two methods in (A) and (B) d) binary stream

781






How many types of operators are there in c?

711


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

751


Why is c not oop?

631


What is the advantage of c?

689


Is it possible to pass an entire structure to functions?

651


#include { printf("Hello"); } how compile time affects when we add additional header file .

1519


why use functions a) writing functions avoids rewriting the same code over and over b) using functions it becomes easier to write programs and keep track of what they are doing c) a & b d) none of the above

771


Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?

680


In the DOS enveronment, normal RAM that resides beyond the 1mb mark. a) expanded memory b) swapped memory c) Extended memory d) none

843


the real constant in c can be expressed in which of the following forms a) fractional form only b) exponential form only c) ascii form only d) both a and b

2159