We can access and assign values to the members of a structure in a number of ways. As mentioned earlier, the members themselves are not variables. They should be linked to the structure variables in order to make them meaningful members. The link between a member and a variable is established using the member operator ‘ . ‘ which is also known as dot operator or period operator. The syntax for accessing a structure member is as shown below: 1 structure–varaible.membername Examples of accessing the members of the student structure are shown below: 1 2 student1.name student1.age Structure Initialization
The post How to access structure members in Programming appeared first on Coding Security.
How to access structure members in Programming
read more
Tidak ada komentar:
Posting Komentar