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

what is the error in the following code: main() { int i=400,j; j=(i*i)/i; }

4 Answers  


what are the techniques for reducing the fragility of a memory bug?

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,


2. A student studying Information Technology at Polytechnic of Namibia is examined by coursework and written examination. Both components of assessment carry a maximum of 50 marks. The following rules are used by examiners in order to pass or fail students. a. A student must score a total of 40% or more in order to pass (total = coursework marks + examination marks) b. A total mark of 39% is moderated to 40% c. Each component must be passed with a minimum mark of 20/50. If a student scores a total of 40% or more but does not achieve the minimum mark in either component he/she is given a technical fail of 39% (this mark is not moderated to 40%) d. Grades are awarded on marks that fall into the following categories. Mark 100-70 69-60 59-50 49-40 39-0 Grade A B C D E Write a program to input the marks for both components (coursework marks out of 50 and examination marks out of 50), out put the final mark and grade after any moderation. [30]

0 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 is exceptions?

5 Answers   HCL, Wipro,


void main() { for(int i=0;i<5;i++); printf("%d",i); } What is the output?..

32 Answers   College School Exams Tests, CTS, HCL, iGate, SmartData,


how to convert decimal to hexadecimal without using arrays just loops

2 Answers  


main() { char c; for(c='A';c<='Z';c++) getch(); }

9 Answers  


What are the different types of errors in C and when they occur?

4 Answers  


Display this kind of output on screen. 1 0 1 1 0 1 3. Display this kind of output on screen. 1 1 0 1 0 1 4. Display this kind of output on screen. 1 1 0 1 0 1 5.Display this kind of output on screen. 1 2 3 4 5 6 7 8 9 10

1 Answers  


Given that two int variables, total and amount , have been declared, write a sequence of statements that: initializes total to 0 reads three values into amount , one at a time. After each value is read in to amount , it is added to the value in total (that is, total is incremented by the value in amount ). Instructor's notes: If you use a loop, it must be a for loop. And if you use a loop control variable for counting, you must declare it.

1 Answers   Google,


Categories