I wrote a C program in VS 2019 to read a file but got the error message "D:\C PROGRAM\TEST\test1\x64\Debug\Test1.exe (process 8072) exited with code -1073741819", So please help me out.
Here is the source code---
#include<stdio.h>
#include<stdlib.h>
int main()
{
FILE* fp;
char ch;
fp = fopen_s(&fp,"linked list C.txt", "r");
if (fp == NULL)
{
puts("\nFile can't be open");
exit(0);
}
/*Line no. before first line*/
do
{
ch = fgetc(fp);
printf("%c", ch);
}while (ch != EOF);
fclose(fp);
return 0;
}