A=0;while(a<5)printf("%d\n", a++);How many times does the loop occurs?A. infiniteB. 5C. 4D. 6

This question is related to TCS Interview

Showing Answers 1 - 7 of 7 Answers

Vikram

  • Jul 10th, 2006
 

The correct ans is option B. and the value will be 5.

  Was this answer useful?  Yes

ranjith

  • Aug 11th, 2006
 

a.infinite

  Was this answer useful?  Yes

Satya

  • Feb 14th, 2007
 

It should be 6 times...Here is the output...012345a++ --> First prints the value then adds.

  Was this answer useful?  Yes

Nishi Rathore

  • Sep 25th, 2007
 

the ans is B, bcoz the loop will work for values of a (0,1,2,3,4)

  Was this answer useful?  Yes

K.k.s

  • Aug 25th, 2018
 

Infinite

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions