Home » C Programming » Pointers » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    struct student
    {
    int roll_no;
    char Name[35];
    }
    void main()
    {
    struct student stu;
    stu.roll_no = 10;
    printf("Ajit Kumar Gupta");
    }
    1. Nothing
    2. Ajit Kumar Gupta
    3. 10
    4. Garbage value
    5. Compilation Error
Correct Option: E

Compilation Error

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



Your comments will be displayed only after manual approval.