.What will be the output of the following C code?

#include <stdio.h>

void main()

{

    int i = 0;

    while (i < 10)

    {

        i++;

        printf("hi\n");

        while (i < 8) 

        {

            i++;

            printf("hello\n");

        }

    }

}
1 Like
  • hi
  • hello
  • hello
  • hello
  • hello
  • hello
  • hello
  • hello
  • hi
  • hi
2 Likes