Home » C Programming » Structures » Question
  1. Which of the following is the correct output fot the program given below?
    #include <studio.h>
    int main ()
    {
    struct emp
    {
    char name[40];
    int age;
    float sal;
    };
    struct emp e = {"Ramu"};
    printf ("%d %f\n", e.age, e.sal);
    return 0;
    }


    1. 0 0.000000
    2. Garbage values
    3. Error
    4. None of the above
Correct Option: A

When an automatic structure is partially initialised, the remaining elements of the structure are initialised to 0.



Your comments will be displayed only after manual approval.