Structures, Unions, Enums

Q1: Point out the error in the program?
#include<stdio.h>

int main()
{
    struct emp
    {
        char n[20];
        int age;
    };
    struct emp e1 = {'Dravid', 23};
    struct emp e2 = e1;
    if(e1 == e2)
        printf('The structure are equal');
    return 0;
}

A Prints: The structure are equal

B Error: Structure cannot be compared using '=='

C No output

D None of above

ANS:A - Prints: The structure are equal

No answer description is available. Let's discuss.



img not found
img

For help Students Orientation
Mcqs Questions

One stop destination for examination, preparation, recruitment, and more. Specially designed online test to solve all your preparation worries. Go wherever you want to and practice whenever you want, using the online test platform.