Correct Answer: a) Using the . operator
Explanation:
When you declare a variable of a structure type, you use the dot operator (.) to access its individual members. This is because the dot operator is used to refer to the specific members of the structure when dealing with a normal structure variable (not a pointer).
For example:
struct Student student1; // Declare a structure variable of type Student
student1.age = 20; // Access the 'age' member of the student1 variable
In this case:
student1 is a structure variable of type Student.
student1.age accesses the age member of the student1 structure.
The dot operator connects the variable name with the specific member you want to access.
The dot operator is essential for accessing members of a structure directly.
#codingquiz #learncoding #learncprogramming #learning #computerprogramming #cse #software
コメント