Home » C Programming » Loops » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    void main()
    {
    int k = 5;
    if (k == 5)
    {
    printf("Hello Interview Mania");
    break;
    }
    }
    1. Hello Interview Mania
    2. Garbage value
    3. Compilation Error
    4. Runtime Error
    5. None of these
Correct Option: C

Compilation Error

main.c: In function ‘main’:
main.c:8:13: error: break statement not within loop or switch
break;



Your comments will be displayed only after manual approval.