void main()
{
int i=5;
printf("%d",i+++++i);
}

Answers were Sorted based on User's Feedback



void main() { int i=5; printf("%d",i+++++i); }..

Answer / neethu

i++=5
++i=6
ans=11

Is This Answer Correct ?    5 Yes 8 No

void main() { int i=5; printf("%d",i+++++i); }..

Answer / nishit

I think the answer should be 13.
as first the i value will be incremented as ++i = 6
then i++ =7
so answer will be 13.
I m not 100 percent sure ! please correct me.

Is This Answer Correct ?    2 Yes 5 No

void main() { int i=5; printf("%d",i+++++i); }..

Answer / sansiri

12

Is This Answer Correct ?    0 Yes 3 No

void main() { int i=5; printf("%d",i+++++i); }..

Answer / vivek

++i=6
i++=5
i++ + ++i
(5+6)++
11++
12

Is This Answer Correct ?    1 Yes 9 No

Post New Answer

More C C++ Errors Interview Questions

how tally is useful?

2 Answers  


What is the code for following o/p * * * * * * * * * * * * * * * *

1 Answers  


What is the out put of this programme? int a,b,c,d; printf("Enter Number!\n"); scanf("%d",&a); while(a=!0) { printf("Enter numbers/n"); scanf("%d%d%d",&b,&c,&d); a=a*b*c*d; } printf("thanks!"); getche(); Entering numbers are a=1,b=2,c=3,d=4 b=3,c=4,d=-5 b=3,c=4,d=0

5 Answers   TCS,


I'm having trouble with coming up with the correct code. Do I need to put a loop? Please let me know if I'm on the right track and what areas I need to correct. I still don't have a good grasp on this programming stuff. Thanks =) The assignment was to write a program using string functions that accepts a coded value of an item and displays its equivalent tag price. The base of the keys: 0 1 2 3 4 5 6 7 8 9 X C O M P U T E R S Sample I/O Dialogue: Enter coded value: TR.XX Tag Price : 68.00

3 Answers   UCB,


Find the error (2.5*2=5) (a) X=y=z=0.5,2.0-5.75 (b) s=15;

3 Answers  






void main() { int i=7; printf("N= %*d",i,i); }

6 Answers   HCL,


when i use cout or cin call & then either << or >> .....it shows declaration syntax error...what should i do? cout<<"anything"; int a; cin>>a; return 0;

2 Answers  


Given an int variable n that has already been declared and initialized to a positive value, and another int variable j that has already been declared, use a do...while loop to print a single line consisting of n asterisks. Thus if n contains 5, five asterisks will be printed. Use no variables other than n and j .

2 Answers  


WHAT WILL BE THE OUTPUT OF THE FOLLOWING QUESTION void main() { int x=4,y=3,z; z=x-- -y; printf("%d%d%d",x,y,z); }

25 Answers   HCL,


Write a c-programe that input one number of four digits and find digits sum?

2 Answers  


what is syntax error?

3 Answers  


Declaration of Cube Guys please help me.. Is this a right way to declare cube.? If i Compile it. It Says: Cube undeclared what should i do? Please help \thanks in advanced #include<stdio.h> #include<math.h> #include<conio.h> main( ) { float x,y; while(x++<10.0) { printf("Enter Number:"); scanf("%d", &x); y = cube(x); printf("%f %f %f \n", x,pow(x,2),y); cube(x); } { float x; float y; y = x*x*x; } getch(); return (y); }

2 Answers  


Categories