6.0k views
5 votes
To access a structure member(component), you use the struct variable name together with the member name; these names are separated by a dot (period).

A)True
B)False

1 Answer

5 votes

Final answer:

The use of a dot (period) to access a structure member using the variable name followed by the member name is true. This is a common syntax in languages such as C or C++ when working with structures.

Step-by-step explanation:

To access a member of a structure in programming, specifically in languages like C or C++, you indeed use the structure variable name followed by a dot (period) and the member name. This is the standard syntax for accessing data within a structure, and it's very commonly used in programming involving custom data types. For example, if you have a structure named Book with a member title, you would access the title of a Book variable named myBook with the expression myBook.title.

Therefore, the answer to the question is A) True. The dot operator is used in many programming languages to access components of a structure and is a fundamental concept in understanding how to work with structured data.

User Theozh
by
7.3k points