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

101



Your comments will be displayed only after manual approval.