Languages-C & C Plus Plus [TCS Placement]: Sample Questions 119 - 119 of 119

Get unlimited access to the best preparation resource for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 119

C & C Plus Plus
Edit

Write in Short

Short Answer▾

What is the equivalent code of the following statement in WHILE LOOP format?

Explanation

  • For (a = 1; a <= 100; a ++)

    Printf ( “% d” , a ⚹ a) ;

  • Same code as while loop:
  1. a=1;
  2. while(a<=100)
  3. { printf(“%d”, aa);
  4.     a++;
  5. }

Developed by: