Accessing Structure Members 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
The post How to access the structure variables in C Programming appeared first on Coding Security.
How to access the structure variables in C Programming
read more
Tidak ada komentar:
Posting Komentar