Home » C Programming » Structures » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    struct Company
    {
    char *ch;
    };
    void main()
    {
    struct Company c1;
    struct Company *c2 = &c1;
    c2->ch = "Interview Mania";
    printf("%s", c2->ch);
    }
    1. Interveiw
    2. Mania
    3. Compilation Error
    4. Interview Mania
    5. None of these
Correct Option: D

Interview Mania



Your comments will be displayed only after manual approval.