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

A sample program using data structure? what is file handling?

0 Answers   TCS,


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

1 Answers  


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,


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

2 Answers  


Why are memory errors hard to debug?

1 Answers  






What is probability to guarantee that the task a programmer is going to create will be created and be able to run on a particular system (RTOS/GPOS).

0 Answers  


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  


what is macro in c? Difference between single linked list & double linked list what is fifo & lifo? what is stack & queue?

2 Answers   TCS,


I can not get my C++ program to work right. It is supposed to tell if a word is a palindrome or not, but it only tells thet the word is not a palindrome. And I can't fix it.

1 Answers  


How to convert hexadecimal to binary using c language..

1 Answers   Bajaj, GAIL, Satyam, Zenqa,


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  


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,


Categories