C++ File Handling and Control Statements Quiz

C++ File Handling and Control Statements Quiz

12th Grade

9 Qs

quiz-placeholder

Similar activities

CSP-A114 Quiz

CSP-A114 Quiz

9th - 12th Grade

12 Qs

Computer Science

Computer Science

10th - 12th Grade

10 Qs

Python Loops

Python Loops

9th - 12th Grade

10 Qs

Hari ke-3 Coding dan Pengenalan AI (Krisna Kumalasari)

Hari ke-3 Coding dan Pengenalan AI (Krisna Kumalasari)

11th - 12th Grade

10 Qs

Python Programming Quiz

Python Programming Quiz

4th Grade - University

6 Qs

Intermediate HTML/CSS Class 1

Intermediate HTML/CSS Class 1

KG - Professional Development

12 Qs

LOOPS IN C++

LOOPS IN C++

10th Grade - University

10 Qs

Loops & Conditional Blocks in Scratch

Loops & Conditional Blocks in Scratch

6th - 12th Grade

10 Qs

C++ File Handling and Control Statements Quiz

C++ File Handling and Control Statements Quiz

Assessment

Quiz

Computers

12th Grade

Medium

Created by

Fidaa Abed

Used 2+ times

FREE Resource

9 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Where can the 'continue' statement be used in C++?

Inside functions

Only inside switch statements

Inside loops and switch statements

Only inside loops

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the 'break' statement do in C++?

Pauses the execution of the loop

Stops the execution of the loop and exits it

Skips the rest of the code inside the loop and continues with the next iteration

Breaks the program

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which header file must be included to use file I/O operations in C++?

<fstream>

<ifstream>

<ofstream>

<filestream>

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to close a file in C++?

closeFile()

fclose()

fileClose()

close()

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image
  1. What does the following C++ code print?

1 3

1 2 3 4

0 2 4

1 3 5

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How does the 'continue' statement affect the flow of a loop in C++?

Terminates the loop immediately

Skips the current iteration and proceeds with the next one

Pauses the loop temporarily

None of the above

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What will be the output of the following C++ code snippet?

1 2 3 4

1 2 4

1 2

1 2 4 5

8.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function is used to open a file in C++ for reading or writing?

openFile()

createFile()

open()

ofstream() / ifstream()

9.

WORD CLOUD QUESTION

2 mins • Ungraded

What is your favorite thing to do in Ramadan