Home » C Programming » Structures » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    struct Result
    {
    int n1;
    char n2;
    struct Result *p;
    };
    int main()
    {
    struct Result Result = {100, 200, &Result};
    printf("%d\n", Result.p->n1);
    return 0;
    }
    1. 200
    2. Compilation Error
    3. 100
    4. Undefined behaviour
    5. None of these
Correct Option: C

100



Your comments will be displayed only after manual approval.