Q:

Assuming p is a pointer to int, explain the following code

0

Assuming p is a pointer to int, explain the following code:

if (p) // ...
if (*p) // ...

All Answers

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

`if (p)` means if the pointer `p` is not null.
`if (*p)` means if the object pointed by the pointer is not false (which means the object is not null or zero etc.).

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