When I try to run this program it says "File doesn't exist" but the file dose exist under C:\ can someone help please.
Code:#include "stdio.h"
main( )
{
FILE *text;
char c;
text = fopen("C:\text.txt", "r");
if (text == NULL) printf("File doesn't exist\n");
else {
do {
c = getc(text); /* get one character from the file
*/
putchar(c); /* display it on the monitor
*/
} while (c != EOF); /* repeat until EOF (end of file)
*/
}
fclose(text);
}