Discussion about c pointers


Discuss the below:

Q: Given the declaration;

int x;
int *p;
int *q;

Mark the following statements that are invalid only. Then explain why it is invalid.
p=q; Answer:
*p=56; Answer:
p=x; Answer:
*p=*q; Answer:
q = &x; Answer:
*p = q; Answer:

 

Solution Preview :

Prepared by a verified Expert
C/C++ Programming: Discussion about c pointers
Reference No:- TGS01936207

Now Priced at $20 (50% Discount)

Recommended (95%)

Rated (4.7/5)