COBOL Online Quiz


Advertisements

Following quiz provides Multiple Choice Questions (MCQs) related to COBOL Framework. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.

Questions and Answers

Q 1 - What is 77 level used for?

A - Renames

B - Redefine

C - Group Item

D - Elementary Level

Answer : D

Explanation

77 level is an elementary level item which cannot be subdivided.

Q 2 - Which cobol verb is used for updating a file?

A - READ

B - WRITE

C - UPDATE

D - REWRITE

Answer : D

Explanation

Rewrite verb is used to update the records. File should be opened in I-O mode for rewrite operations. It can be used only after a successful Read operation. Rewrite verb overwrites the last record read.

Answer : C

Explanation

Linkage section comes under data division which is used in called program.

Q 4 - Which level number we should use for conditions?

A - 77

B - 88

C - 01

D - 66

Answer : B

Explanation

88 level number is used for defining condition name entries.

Q 5 - How many bytes S9(6) USAGE IS COMP will take?

A - 6

B - 4

C - 3

D - 2

Answer : B

Explanation

S9(6) USAGE is COMP will take 4 bytes based on the following formula which is used to calculate when USAGE is COMP :
S9(n) USAGE is COMP
If 'n' = 1 to 4, it takes 2 bytes.
If 'n' = 5 to 9, it takes 4 bytes.
If 'n' = 10 to 18, it takes 8 bytes.

Q 6 - Physical record is the information that exists on the external device and Logical record is the information which is used by the program. Is this statement true or false?

A - True

B - False

Answer : A

Explanation

This statement is correct.

Q 7 - How records are stored & accessed in indexed file organization?

A - Relative address method

B - Sequential access method

C - Direct access method

D - Both B & C

Answer : D

Explanation

An indexed sequential file consists of records that can be accessed sequentially. Direct access is also possible.

Q 8 - Which verb is used to count or replace the characters in a string?

A - Count

B - Inspect

C - Replace

D - Add

Answer : B

Explanation

Inspect verb is used to count or replace the characters in a string. String operations can be performed on alphanumeric, numeric, or alphabetic values. Inspect operations are performed from left to right.

Answer : A

Explanation

01-07 are reserved for line numbers.

Q 10 - What is the length of a variable when usage is COMP-1?

A - 16

B - 2

C - 8

D - 4

Answer : D

Explanation

COMP-1 takes 4 bytes of storage.

cobol_questions_answers.htm
Advertisements