2074 10

CSC115 ยท 2074 ยท 5 marks

Write a program to read and print data stored in a file input.txt.

Write a program to read and print data stored in a file input.txt. [5]

C ProgrammingChapter 10: File Handling in CInput Output Operations in File
  • A file is a collection of related data placed on disk. - fopen() is used to open a file with a specified mode. - Mode "r" opens an existing file for reading only; previous data is not erased. - fgetc() reads a single character from a file and increments the file pointer. - fclose() is used to c...