C Quiz – 109 | Question 1

In the following program snippet, both s1 and s2 would be variables of structure type defined as below and there won’t be any compilation issue.

filter_none

edit
close

play_arrow

link
brightness_4
code

typedef struct Student
{
 int rollno;
 int total;
} Student;
  
Student s1;
struct Student s2;

chevron_right


(A) TRUE
(B) FALSE


Answer: (A)

Explanation: At first, it may seem that having same ‘struct tag name’ and ‘typedef name’ would cause issue here. But it’s perfectly fine for both of them having same name. s1 is defined using typedef name Student while s2 is defined using struct tag name Student.

Quiz of this Question



My Personal Notes arrow_drop_up

Recommended Posts:



    Article Tags :
    Practice Tags :


    1


    Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.