Home » C Programming » Structures » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    struct country
    {
    int code;
    char name[26];
    }
    void main()
    {
    struct country c;
    c.code = 91;
    printf("India");
    }
    1. Garbage value
    2. India
    3. 91
    4. Compilation Error
    5. None of these
Correct Option: D

Compilation Error

main.c:7:5: error: expected ‘;’, identifier or ‘(’ before ‘void’
void main()



Your comments will be displayed only after manual approval.