[quote=“howdydoody2”]I am having a little trouble with this section…
i thought the if statement needs an expression like <,>,= etc. to make a true/false decision.
if (ftPtr) {
printf("Storing %.0f to the address %p\n", feet, ftPtr);
*ftPtr = feet;
}
what is the if statement evaluating?
thanks.[/quote]
If I understand it correctly, a good way to think about it is
if (this is a thing / exists) {(/*then do this*/); *the thing*
}
So if the thing in parenthesis is an actual thing, then it will execute what’s next. So it checks to see if *ftPtr is an actual thing, that it exists, and as long as it does, it will print the string that was written out.