C Programming MCQ Question and Answer
C Programming MCQ Question and Answer
12. The function fclose() is
- used to disconnect a program from file
- used to close a file logically
- both options a and b
- a mandatory function call in file handling
13. The action of connecting a program from a file is obtained by the function
- fclose()
- delete()
- fdisconnect()
- clear()
15. The function(s) used for reading a character from a file is (are)
- getc()
- fgetc()
- both options an and b
- fgetcharo()
16. The function(s) used for writing a character to a file is (are)
- put()
- fputc()
- both options a and b
- fputcharQ
17. The function(s) used for reading formatted input data from a file is (are)
- getchar()
- fscanf()
- scanf()
- gets()
19. What is the value of origin used in fseek(fptr,position, origin);? to represent end of file.
- 0
- 1
- 2
- EOF
20. What is the value of origin used in fssek(fptr, position, origin);? to represent the beginning of the file
- 0
- 1
- 2
- START