the following program will simply read whats inside test.txt and will display that on the screen. However, it will also print the ascii value for the empty line that follows the text. Could you please tell me what i should be doing in order to have the text as the only output on the screen (after all, is this a good way of displaying my file anyways?)
Also, what if i am working with binary files. how can i display the contents of such files?
ptr = fopen("test.txt","r+");
printf("Error: File does not exist\n\n");
while(ch != EOF);