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 = 1;
    for (k = 0; k < 10; k++)
    {
    p++;
    q++;
    continue;
    }
    printf("%d, %d", p, q);
    }
    1. 0, 10
    2. 10, 0
    3. 11, 10
    4. 10, 11
    5. None of these
Correct Option: D

10, 11



Your comments will be displayed only after manual approval.