void main()
for(int i=0;i<5;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

Post New Answer

More C C++ Errors Interview Questions


3 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  

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,

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

0 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  

errors are known as?

3 Answers   State Bank Of India SBI, EX,

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

1 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,

void main() { int i=1; printf("%d%d%d",i,++i,i++); } Cau u say the output....?

24 Answers   HCL,

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

2 Answers  

what is the large sustained error signal that eventually cause the controller output to drive to its limit

1 Answers   TCS,