

/* What is the output of the following?*/
/*
a) Value of i is 10
b) Value of i is 5
c) Value of i is 7
d) The loop runs infinitely. Nothing is printed.
e) None of the above
*/

#include <stdio.h>

main()
{
   int i=10,j=5;

   while (i)   /* i=10 means true */
    {  if (i>=2*j) /* 10==10 */
          { i -= 3; printf("whatever\n"); }
      else
         i += 3;
     printf("Value of i is %d\n",i);
    }
}

