Diagnostic Quiz
Last updated
Last updated
Remember the pointer type match we have discussed in the lecture. See .
A pointer to <type>
can only store the address of the variable with the same <type>
You cannot assign double
to a long
variable, this will generate compilation error!
free a "heap-object" pointer twice will cause undefined behavior or memory error
after freeing a "heap-object" pointer, if you access the address pointed to by the pointer, you will get memory error.
In C, only the characters enclosed by ""
will be considered as a valid string.