Search Header Logo

File handling and procedure

Authored by Eva Wan

Computers

9th - 12th Grade

Used 1+ times

File handling and procedure
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

25 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the first step in file handling?

Opening a file

Writing to a file

Reading from a file

Closing a file

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the purpose of a procedure?

To organize code into reusable blocks

To perform calculations

To handle exceptions

To display messages

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the general purpose of file handling in a program?

To store data temporarily

To perform calculations

To permanent storage of data

None of the above

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a procedure in programming?

a sequence of steps that is given an identifier and can be called to perform a sub-task

A function that returns a value

A class that contains methods

None of the above

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

A procedure with no parameters is defined as follows

PROCEDURE <identifier>

<statement(s)>

ENDPROCEDURE

PROCEDURE <identifier>

<statement(s)>

PROCEDURE <identifier>(<param1> , <param2> ...)

<statement(s)>

ENDPROCEDURE

PROCEDURE <identifier>(<param1> : <data type>, <param2> : <data type>...)

<statement(s)>

ENDPROCEDURE

6.

FILL IN THE BLANK QUESTION

1 min • 1 pt

Function: a sequence of steps that is given an identifier and returns a _____ value; function call is part of an expression

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

If a file does not exist, what will happen when you try to read from it?

The program will crash

The file will be created automatically

An error will be raised

Data will be read from another file

Access all questions and much more by creating a free account

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

Already have an account?