File handling and procedure

File handling and procedure

9th - 12th Grade

25 Qs

quiz-placeholder

Similar activities

MaWD 4.01

MaWD 4.01

KG - University

20 Qs

HTML, CSS & JS

HTML, CSS & JS

11th - 12th Grade

25 Qs

HTML & CSS

HTML & CSS

9th - 12th Grade

22 Qs

Web Programming

Web Programming

12th Grade

20 Qs

Online World revision quiz

Online World revision quiz

11th Grade

20 Qs

SDA Chapter 7A Vocabulary

SDA Chapter 7A Vocabulary

6th - 9th Grade

20 Qs

SDA Chapter 2 Vocabulary

SDA Chapter 2 Vocabulary

7th - 9th Grade

20 Qs

CSS Classes IDs etc

CSS Classes IDs etc

10th Grade

20 Qs

File handling and procedure

File handling and procedure

Assessment

Quiz

Computers

9th - 12th Grade

Hard

Created by

Eva Wan

Used 1+ times

FREE Resource

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

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?