![]() ![]() ) operator is greater than that of indirection ( *) operator. Parentheses around *ptr_dog are necessary because the precedence of dot(. (*ptr_dog).name - refers to the name of dog (*ptr_dog).breed - refers to the breed of dog ) operator, followed by the name of the member. ![]() To access a member of structure write *ptr_dog followed by a dot(. This means spike and *ptr_dog are functionally equivalent. Using Indirection (*) Operator and Dot (.) Operator #Īt this point ptr_dog points to the structure variable spike, so by dereferencing it we will get the contents of the spike.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |