C++ Chapter 12

C++ Chapter 12

10th Grade - University

38 Qs

quiz-placeholder

Similar activities

KUIZ TMK TAHUN 6

KUIZ TMK TAHUN 6

12th Grade

40 Qs

1.1.1. Structure and function of the processor

1.1.1. Structure and function of the processor

12th Grade

34 Qs

dasar desain grafis

dasar desain grafis

10th Grade

33 Qs

PHOTOPEA TEST-补考

PHOTOPEA TEST-补考

11th Grade

42 Qs

Ôn thi giữa kì 1 - Tin học - 11a3

Ôn thi giữa kì 1 - Tin học - 11a3

11th Grade

40 Qs

Mid Tes HTML Quiz

Mid Tes HTML Quiz

11th Grade

35 Qs

Pemrograman Dasar

Pemrograman Dasar

10th Grade

40 Qs

Computer Pretest(Arduino)

Computer Pretest(Arduino)

12th Grade

33 Qs

C++ Chapter 12

C++ Chapter 12

Assessment

Quiz

Computers

10th Grade - University

Medium

Created by

Colleen Chattaway

Used 39+ times

FREE Resource

38 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Data stored here disappears once the program stops running or the computer is powered down.

on a CD
in RAM
on a backup tape
on the hard disk

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In order, the three-step process of using a file in a C++ program involves:

Insert a disk, open a file, remove the disk
Create the file contents, close the file, name the file
Open the file, read/write/save data, close the file
Name the file, open the file, delete the file

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

This data type can be used to create files and write information to them but cannot be used to read information from them.

ofstream
ifstream
afstream
outstream

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

This data type can be used to create files, read data from them, and write data to them.

ofstream
iftream
fstream
stream

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which statement opens a file and links it to a file stream object?

open(aFile) = link(anObject);
file.open("c:\\filename.txt");
linkstream ("filename.txt");
link(open(filename.txt"));

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is true about the following statement?   out.open("values.dat", ios::app);

If the file already exists, its contents are preserved and all output is written to the end of the file
If the file exists, it should be replaced with a new copy of values.dat
If the file exists, it can be opened but not modified
None of these

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements opens the file info.txt for both input and output?

dataFile.open("info.txt", ios::in && ios::out);
dataFile.open("info.txt", ios::in , ios::out);
dataFile.open("info.txt", input || output);
dataFile.open("info.txt", ios::in | ios::out);

Create a free account and access millions of resources

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?