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

Mania Interview



Your comments will be displayed only after manual approval.