Home » C Programming » Structures » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    struct test
    {
    int num;
    } t;
    void func(struct test t)
    {
    t.num = 125;
    printf("%d ", t.num);
    }
    main()
    {
    func(t);
    printf("%d ", t.num);
    }
    1. Compilation Error
    2. 125 0
    3. Garbage value
    4. Nothing
    5. None of these
Correct Option: B

125 0



Your comments will be displayed only after manual approval.