Question 80

Consider the following C program
#include <stdio.h>
main()
{
float sum = 0.0, j = 1.0, i = 2.0;
while ( i/j > 0.001 ){
j=i+1
sum = sum + i/j;
printf ( “%f\n”, sum);
}
}
How many lines of output does this program produce?


Create a FREE account and get:

  • Download Maths Shortcuts PDF
  • Get 300+ previous papers with solutions PDF
  • 500+ Online Tests for Free

cracku

Boost your Prep!

Download App