So the problem is, im trying using fgets to read a line from a text and print it out, and it just doesn't work quite well, its read all the file perfectly until the end,but it reads the last line twice and than "shouts" segemnation fault.
void somefun(FILE *file){
char *buf[81];
while(!feof(file)){
if(fgets(buf,80,file)){
continue;}
printf("%s,buf); }
void main() {
FILE *fp;
fp=fopen("somefile.txt","r+");
somefun(fp); }