1. |
If a variable is a pointer to a structure, then which of the following operator is used to access data members of the structure through the pointer variable? |
|||||||
Answer: Option D Explanation: "." is used to access elements of a class via an object of class eg- class cls &(ampersand) = points the address of the variable declared *(as-trick) = points the value of the variable declared. ->(spangles) = accesses the pointer variable that contains the address of another variable. Note: ". " : used to access structure members with normal structure variable. "->" : used to access structure members with pointer to structure. "*" : used to dereference a pointer. "&" : used to obtain address of variable. |
Post your comments here:
Name *:
Email : (optional)
Your comments will be displayed only after manual approval.