Home » C Programming » Loops » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    int main()
    {
    int k = 0;
    char ch = 'U';
    while (k < 2)
    {
    k++;
    switch (ch)
    {
    case 'U':
    printf("%c ", ch);
    break;
    break;
    }
    }
    printf("\nInterview Mania");
    }
    1. U U
    2. Interview Mania
    3. Compilation Error
    4. U U
      Interview Mania
    5. U
      Interview Mania
      U
Correct Option: D

U U
Interview Mania



Your comments will be displayed only after manual approval.