First, p and q already configured ( q pointing to an existing line, and p to the buffer where you plan to copy the line).
In the second case, you have a difference between an array of characters and an array of pointers to characters.
An array of characters will occupy 80000*sizeof(char) bytes (usually 80,000). An array of pointers will take 80000*sizeof(char*) , which is usually 320,000 bytes on a 32-bit system or 640,000 bytes on a 64-bit system.
No array is initialized.
An array of pointers is supposed to point to a group of strings.
Finally: arrays and pointers are not the same thing. I repeat: not the same thing. Just arrays can be freely converted to pointers whenever they need a compiler. So you can use arithmetic of pointers on arrays.
source share