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

What is the output?..

Answers were Sorted based on User's Feedback

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

Answer / samir isakoski

it goes from 0 to 5

and print i

 Is This Answer Correct ? 11 Yes 38 No

More C C++ Errors Interview Questions

write the value of x and y after execution of the statements: int x=19,y; y=x++ + ++x; x++; y++;

loop1: { x=i<n?(i++):0; printf("%d",i); exit(x); continue; } Error- misplaced continue. Doubt-1.will the exit(x) be executed for all values of x 2.will this statement go out of the program.

which typw of errors ? & how to solve it ?

what is meant for variable not found?

Given that two int variables, total and amount, have been declared, write a loop that reads integers into amount and adds all the non-negative values into total. The loop terminates when a value less than 0 is read into amount. Don't forget to initialize total to 0. Instructor's notes: This problem requires either a while or a do-while loop.

Write a C program to enter 10 integer numbers through one variable and count how many of them are even using while loop ?

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.

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 .

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

who was the present cheif governor of reserve bank of india

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