Home » C Programming » Structures » Question
  1. What will be the output of the following C code?
     #include <stdio.h>
    int main()
    {
    typedef struct B *ptr;
    struct B
    {
    int num1;
    char num2;
    ptr ptr1;
    };
    struct B b = {15, 25, &b};
    printf("%d\n", b.ptr1->num1);
    return 0;
    }
    1. 25
    2. Compilation Error
    3. Garbage value
    4. 15
    5. None of these
Correct Option: D

15



Your comments will be displayed only after manual approval.