Code:char *p; int fd; int count; fd = open (filename, O_RDONLY, 0777); count = read(fd,p,100); printf("%d",count);
Code:char *p; int fd; int count; fd = open (filename, O_RDONLY, 0777); count = read(fd,p,100); printf("%d",count);
and this is C not C++
All problems in computer science can be solved by another level of indirection,
except for the problem of too many layers of indirection.
– David J. Wheeler
http://cpwiki.sf.net/A_pointer_on_pointers
Uninitialized pointers are very bad. I suggest you read the article to get some insight on pointers.