When I compile this code,it works perfectly, but when I execute it the following error message is displayed. Can anyone explain why ?Code:#include <stdio.h> main() { FILE *fp; fp=fopen("Welcome.txt","r+"); char c; while((c=fgetc(fp))!=EOF) { if((c>='a')&&(c<='z')) c -= 32; fputc(c,stdout); } fclose(fp); }
Code:Exception 0xc0000005 Segment Violation Address: 0x73da15ce