12th Class Computer Science Chapter 14 MCQs with Answers

Welcome to the 12th Class Computer Science Chapter 14 MCQs Online Test. We are presenting you with top MCQ questions from the 12th Class Computer Science Chapter File Handling in C.

We want to tell you that you can find all the 12th Class Computer Science Chapter 04 MCQs online tests on our website. These online tests are great for learning and as well as for scoring maximum marks in your Intermediate Exams. We are making these Class 12 Computer Science MCQs online tests for those who want full marks in their exams. Attempt all these Grade 12 Computer Science Online Multiple Choice Questions MCQs before going for the exam and it will be beneficial for you! These online tests contain all the important multiple choice questions in the important topics of the FSC Part-II  Computer Science Chapter 14 File Handling in C. 

12th Class Computer Science Chapter 14 MCQs with Answers

Youth For Pakistan has provided an excellent opportunity for the students of the 12th class to prepare their Computer Science Chapter 14 File Handling in C online with MCQs test.

This is a free platform for students to prepare for Computer Science Exams for Class 12 to get the best accomplishments in annual exams. 12th class Students can analyze themself by attempting this online test system as many times as they want until they find themself fully prepared.

MCQs Class 12 Computer Science with Answers

The purpose of these online MCQs tests is to help you evaluate your 12th Class Computer Science Chapter 14 MCQs. These Multiple Choice Questions (MCQs) will prepare you for your academic success in the 12th Class Exams. 12th Class Computer Science Chapters include Chapter No 1 Data basics, Chapter No 2 Basic Concepts And Terminology, Chapter No 3 Database Design Process, Chapter No 4 Data Integrity & Normalization, Chapter No 5 Introduction of Microsoft Access, Chapter No 6 Table and Query, Chapter No 7 Microsoft Access forms & Reports, Chapter No 8 Getting Started with C, Chapter No 9 Element Of C, Chapter No 10 Input/Output, Chapter No 11 Decision Constructors, Chapter No 12 Loop Constructors, Chapter No 13 Functions and Chapter No 14 File Handling in C. 

What is File Handling in C?

File Handling is the storing of data in a file using a program. In C programming language, the programs store results, and other data of the program to a file using file handling in C. Also, we can extract/fetch data from a file to work with it in the program.

Chapter No 14 File Handling in C

1. A file is stored in choose which one is correct:

  1. RAM
  2. Hard Disk
  3. ROM
  4. Cache

2. Which of the following function is used to write a string to a file choose which one is correct?

  1. puts( )
  2. pute( )
  3. fputs( )
  4. fgets( )

3. On successfully closing a file , the fclose( ) returns choose which one is correct:

  1. NULL
  2. 0
  3. 1
  4. file pointer

4. An array subscript should be

  1. int
  2. float
  3. double
  4. an array

5. A data file a stored in choose which one is correct:

  1. RAM
  2. hard disk
  3. EEPROM
  4. None

6. Which of the following mode open only an existing file for both reading and writing choose which one is correct?

  1. “w”
  2. “w+”
  3. “r+”
  4. “a+”

7. function is used to write a string to a file choose which one is correct:

  1. puts()
  2. putc()
  3. fputs()
  4. fgets()

8. To store data for future use it must be stored on _____________

  1. RAM
  2. ROM
  3. Secondary Storage
  4. All of Above

9. A collection of related records is called __________

  1. Data
  2. Field
  3. Database
  4. File

10. A logical interface to a file is called ____________.

  1. I/O
  2. File I/O
  3. Stream
  4. Pointer

11. A stream is associated with a file using and ________operaton

  1. Association
  2. Attach
  3. Link
  4. Open

12. function is used to read a single character from a file at a time choose which one is correct:

  1. fscanf()
  2. getch()
  3. fgetc()
  4. fgetc()

13. function is used as formatted output file function choose which one is correct:

  1. printf()
  2. fprintf()
  3. puts()
  4. fputs()

14. If programs get input data from data file and also send output into data file. It is called choose which one is correct:

  1. files
  2. file processing
  3. data files
  4. file handling

15. There are ___ types of streams

  1. 1
  2. 2
  3. 3
  4. Many

16. In file handling sequence of characters refers to __________

  1. Text Stream
  2. File Stream
  3. Binary Stream
  4. Character Stream

17. In text stream characters have _________ correspondence

  1. One to One
  2. One to Many
  3. Many to One
  4. All of above

18. In binary stream bytes have ______________correspondence

  1. One to one
  2. One to Many
  3. Many to One
  4. All of Above

19. In text file, data is stored in choose which one is correct:

  1. ASCII code
  2. Binary code
  3. Octal code
  4. text code

20. is true about a stream choose which one is correct:

  1. It is a general name given to a flow of data
  2. It is simply a sequence of bytes.
  3. It is a logical interface to data files.
  4. All of these

21. In character conversion

  1. text stream
  2. binary stream
  3. output stream
  4. input stream

22. In file handling sequence of bytes refers to __________

  1. Text Stream
  2. File Stream
  3. Binary Stream
  4. Character Stream

23. A text file is a _________ collection of characters

  1. Fresh
  2. Old
  3. Named
  4. All of Above

24. To mention end of file point a marker______ is used

  1. File End (FE)
  2. End File(EF)
  3. End of File(EF)
  4. End of File(EOF)

25. To open a file __________ function is used

  1. open()
  2. fileopen()
  3. fopen()
  4. All of Abvoe

26. represents the new-line marker choose which one is correct:

  1. ‘\t’
  2. ‘\n’
  3. ‘\r’
  4. ‘\0’

27. The data type of file pointer is choose which one is correct:

  1. int
  2. double
  3. void
  4. FILE

28. mode can be used to read data from the data file choose which one is correct:

  1. “r”
  2. “a”
  3. “w”
  4. None

29. modes can be used to read and write data to and from the data file choose which one is correct:

  1. “r+”
  2. “a+”
  3. “w+”
  4. All of these

30. fopen() function take _____ parameters

  1. 1
  2. 2
  3. 3
  4. 4

31. In the absolute path of a file we use_______

  1. /
  2. \
  3. \\
  4. //

32. To open a file for writing if it already exists

  1. W
  2. r+
  3. r
  4. read

33. Which one is true about pointer type variable

  1. It holds the data
  2. It holds the information
  3. It holds the address of a memory location
  4. It hold the name of a location

34. Which of the following is ca consecutive group of memory locations with the same name and type choose which one is correct?

  1. Simple variable
  2. Structure
  3. Array
  4. Pointer

35. An array index / subscript must be of data type choose which one is correct:

  1. int
  2. double
  3. float
  4. All of these

36. A file can be closed using _________ funciton

  1. close()
  2. fclose()
  3. fileclose()
  4. None of Above

37. To write a character on a file ________ function is used

  1. write()
  2. fwrite()
  3. put()
  4. putc()

38. To write a character on a file function takes ________ parameters

  1. 0
  2. 1
  3. 2
  4. 3

39. The index of an element is written within choose which one is correct:

  1. curly brackets }
  2. parentheses ( )
  3. square breakles [ ]
  4. angle brackets < >

40. The elements of array abc [10] is numbered from choose which one is correct:

  1. 1 to 10
  2. −5 to 5
  3. 0 to 9
  4. 0 to 10

41. assignment statements assigns value to the first element of an array a choose which one is correct:

  1. a = 15;
  2. a[0] = 15;
  3. a [1] = 15;
  4. All of these

42. Which one is not a valid parameter of putc() function

  1. File Name
  2. Character
  3. File Pointer
  4. All of Above

Leave a Comment