If you want to modify a pointer, you need a pointer to pointer, because you can only modify something if you have a pointer to it (you need to know the original address of the thing you want to...
Type: Posts; User: matsp
If you want to modify a pointer, you need a pointer to pointer, because you can only modify something if you have a pointer to it (you need to know the original address of the thing you want to...
Erm, fgets(), like gets(), returns a pointer to the buffer, or NULL if EOF was encountered. It will never ever return 1 [For the pedants: unless you have a system where memory address 1 is a valid...
No, NULL is return if there was an error (such as end-of-file when the first attempt to read was made). Of course if you pass in NULL, it will also return NULL (assuming it succesfully completes),...