chtp5_11-TIF-Beta - 11.1Introduction 11.1 are used for...

Info icon This preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
11.1 Introduction 11.1 ________ are used for permanent retention of large amounts of data. (a) Structures (b) Arrays (c) Records (d) Files ANS: (d) 11.2. Which of the following is false? a) Storage of data in memory variables is temporary; all such data is lost when a program terminates. b) Computers store files on primary storage devices, typically disk storage devices. c) Files are used for permanent retention of data (typically large amounts of data). d) Storage of data in memory arrays is temporary; all such data is lost when a program terminates. ANS: (b) 11.2 The Data Hierarchy 11.3 Ultimately, all data items processed by a computer are reduced to ________ which are the smallest data items in a computer. (a) characters (b) bits (c) bytes (d) characters ANS: (b) 11.4 A ________ is composed of 8 bits (a) byte (b) field (c) character set (d) both (a) and (c) ANS: (a) 11.5 A sequential file is organized by the ________ field. (a) record (b) sequential (c) key (d) record key ANS: (d) 11.6. Which statement is true? a) The smallest data item in a computer is called a byte. b) Digits, letters and special symbols are referred to as memory words. c) Fields are composed of records. d) Bytes are composed of bits. ANS: (d) 11.7. To facilitate the retrieval of specific records from a file, at least one field in each record is typically chosen as a record _________. a) index b) key
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
c) name d) location ANS: (b) 11.8. The most popular type of file organization is the __________ file. a) sequential b) database c) hierarchy d) collection ANS: (a) 11.9. The set of characters that may be used to write programs and represent data items on a particular computer is called that computer’s _________ set. a) data b) file c) byte d) character ANS: (d) 11.10. A group of related files is called a __________. a) database management system b) database c) dataset d) data hierarchy ANS: (b) 11.3 Files and Streams 11.11 Which of the following is not a stream associated with C files? (a) stdin (b) stdout (c) stdchar (d) stderr ANS: (c) 11.12 Which of the following is not part of the FILE  structure specified in <stdio.h> ? (a) file descriptor (b) open file table (c) read/write methods (d) file control block ANS: (c) 11.13. C views each file simply as a sequential stream of __________. a) bits b) bytes c) fields d) records ANS: (b) 11.14. Which of the following is not automatically opened when a C program begins? a) standard error b) standard output c) standard dialog d) standard input
Image of page 2
ANS: (c) 11.15. __________ provide communication channels between files and programs. a) Streams b) Records c) File descriptors d) File control blocks (FCBs) ANS: (a) 11.16. The standard __________ stream enables a program to read data from the keyboard. a) read b) keyboard c) dialog d) input ANS: (d) 11.17. Function __________ reads one character from a file. a) fgetcharacter b) fgetc c) fgetchar d) fgetbyte ANS: (b) 11.18. Function fputs writes a __________ to a file. a) character b) stream c) line d) standard output ANS: (c) 11.4 Creating a Sequential-Access File 11.19 Which mode would you use if you wanted to open a file for both reading and writing?
Image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern