what is wrong in this program... its giving segmentation fault......
Code:#include <stdio.h> main() { FILE *fp; char *ch; int n; if((fp = fopen("./stuf", "r+")) != NULL) printf("no problem\n"); else printf("problem\n"); while(fread(ch, 1, 1, fp)) { printf("not entering\n"); printf("%c\n", *ch); } }