head is a pointer to the head of a linked list of points that is built. How do you access the member x of the head node of the list?


 

 

head is a pointer to the head of a linked list of points that is built. How do you access
the member x of the head node of the list?

 struct point{
int x,y;

typedef struct point Point;
struct ptlist{
Point pt;
struct ptlist* next;

struct plist *head;

 A. head >pt >x
B. head >pt.x
C. Both are equivalent
D. Both are incorrect
Answer. B)
A pointer to a structure lets access to the member variables using “ >” operator and a normal
variable lets access through the “.” operator.

Comments

Popular posts from this blog

how to download and install secure exam browser for Accenture test

How to create Simple Company Website with Admin Panel in PHP | Free Source Code Download

SAP Labs Hiring Associate Developer (2022/2021 Batch)

Capgemini Engineering PSS hiring for-Engineering MCA Batch 2020/2021/2022

Amazon Hiring Cloud Support Associate (2022/2021 Batch)