Q:

The types of the pointer and the object to which it points must match

0

The types of the pointer and the object to which it points must match.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

double dval;
double *pd = &dval; // ok: initializer is the address of a double
double *pd2 = pd; // ok: initializer is a pointer to double
int *pi = pd; // error: types of pi and pd differ
pi = &dval; // error: assigning the address of a double to a pointer to int

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now