C Programming MCQ Questions and Answers
C Programming MCQ questions with answers are a favorite in programming interview questions with answers for software placement exams like TCS, Infosys, and Wipro. The C language forms the base for all modern programming, focusing on data types, control structures, loops, arrays, and pointers. This section provides a curated set of multiple-choice questions designed to test your coding logic and understanding of C fundamentals. Practice these questions regularly to build confidence and accuracy in technical interviews and coding assessments.
C Programming MCQ
Showing 10 of
25 questions
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()
18. The function used for random access of a file is
- fseek()
- ftel()
- sarch()
- rewind()
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