Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Answers were Sorted based on User's Feedback



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

Answer / manjunath.b.a

i=5
j=12

Is This Answer Correct ?    1 Yes 1 No

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

Answer / vivek patel

it give warning...........

because fun should have return type...

first i=2

then ++i so i=3 and j=3+ ++i + i++
then ++i so i=4 and j=3 + 4 + i++;
then i++ so i=5 and j=3 + 4+ 5;
so i=5 and j=12;

there is no more diff between i++ and ++i in run time..
it gives same ans....

Is This Answer Correct ?    3 Yes 3 No

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

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

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

Answer / barathi

i=2
j=9

Is This Answer Correct ?    0 Yes 0 No

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

Answer / nb

i = 2 (i dont change)
j = 6 (++i = 3 and in i++ increments after calculating j )

Is This Answer Correct ?    1 Yes 6 No

Post New Answer

More C Interview Questions

What are integer variable, floating-point variable and character variable?

0 Answers  


main() { int age; float ht; printf("Enter height and age"); scanf("%d%d",&height,&age); if((age<=20)&&(ht>=5)) {printf("She loves you");} else {printf("She loves you");} }

2 Answers  


When do we get logical errors?

0 Answers  


What are the average number of comparisons required to sort 3 elements?

2 Answers   DRDO,


What is a pointer?

1 Answers   ADP, IFFCO,


What does static mean in c?

1 Answers  


How can I invoke another program or command and trap its output?

0 Answers  


How will you find a duplicate number in a array without negating the nos ?

0 Answers  


main() { int x=2, y=4 if ((x==2||y==4) x++ y++ if (y==4+1) { x=x+y; } y++; printf("The values of x and y are %d and %d."x,y); } What is the output?

5 Answers   TCS,


main() { inta=10,b=20; a>=5?b=100:b=200; printf("%d ",b); }

0 Answers   Wilco,


what is difference b/w extern & volatile variable??

6 Answers   Teleca,


what is data structure?

5 Answers   CBSE,


Categories