Home » C Programming » Loops » Question
  1. What will be the output of the following C code?
     #include <stdio.h>
    int main()
    {
    int p = 0, k = 0, q;
    for (k = 0; k < 10; k++)
    {
    p++;
    if (k == 9)
    break;
    }
    printf("%d",p);
    }
    1. 0
    2. 9
    3. 10
    4. All of above
    5. None of these
Correct Option: C

10



Your comments will be displayed only after manual approval.