Додати до Chrome
✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.
typedef struct Student{ int rollno; int total;} Student;Student s1;struct Student s2;
typedef struct Student
{
int rollno;
int total;
} Student;
Student s1;
struct Student s2;
Which statement is correct?
The code compiles, but s1 and s2 are of different types because typedef creates a new unrelated type.
s1
s2
typedef
s2 is valid, but s1 causes a compilation error because Student can only be used with the struct keyword
Student
struct
Both s1 and s2 are valid variables of the same structure type, and the code compiles without any error
1
s1 is valid, but s2 causes a compilation error because the struct tag name and typedef name cannot be the same.
Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!