![if !IE]> <![endif]>
Referencing Structure Elements
Once the two objects of student structure type are declared (balu and frank),their members can be accessed directly. The syntax for that is using a dot (.) between the object name and the member name. For example, the elements of the structure Student can be accessed as follows:
If the members are a pointer types then ‘→’ is used to access the members. Let name is a character pointer ins student like char * name It can be accessed student → name
A structure without a name/tag is called anonymous structure.
The student can be referred as reference name to the above structure and the elements can be accessed like student.rollno, student.age and student.weight .
Copyright © 2018-2023 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.