- COBOL - Home
- COBOL - Overview
- COBOL - Environment Setup
- COBOL - Program Structure
- COBOL - Basic Syntax
- COBOL - Data Types
- COBOL - Basic Verbs
- COBOL - Data Layout
- COBOL - Conditional Statements
- COBOL - Loop Statements
- COBOL - String Handling
- COBOL - Table Processing
- COBOL - File Handling
- COBOL - File Organization
- COBOL - File Access Mode
- COBOL - File Handling Verbs
- COBOL - Subroutines
- COBOL - Internal Sort
- COBOL - Database Interface
COBOL Online Quiz
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.
Q 1 - Where does AREA B in COBOL start from?
Answer : B
Explanation
All COBOL statements must begin in area B which starts from 12 to 72 columns
Q 2 - Where does the FILE-CONTROL paragraph appear?
Answer : B
Explanation
FILE-CONTROL paragraph appears in the Input-Ouput Section in the Environment Division which provides information of external data sets used in the program.
Answer : B
Explanation
10.9- is invalid because sign can not be mentioned on the right.
Answer : C
Explanation
66 level number is used for RENAMES.
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 - What is the output of following program?
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 WS-TABLE.
05 WS-A PIC A VALUE 'A' OCCURS 5 TIMES.
PROCEDURE DIVISION.
DISPLAY WS-TABLE.
STOP RUN.
Answer : B
Explanation
We are displaying the complete table so all the 5 occurrences will come 'AAAAA'.
You can try same code using Try it option available below:
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 WS-TABLE.
05 WS-A PIC A VALUE 'A' OCCURS 5 TIMES.
PROCEDURE DIVISION.
DISPLAY WS-TABLE.
STOP RUN.
Q 7 - How records are stored & accessed in sequential file organization?
Answer : B
Explanation
A sequential file consists of records that are stored and accessed in sequential order.
Q 8 - Which option is used in Inspect verb to replace the string characters?
Answer : C
Explanation
Replacing option is used to replace the string characters.
Q 9 - Where does Identification Area in COBOL starts from?
Answer : D
Explanation
Identification area is used as needed by the programmer.
Q 10 - Class condition is used to check if an operand contains only alphabets or numeric data. Spaces are considered in ALPHABETIC, ALPHABETIC-LOWER, and ALPHABETIC-UPPER. State whether true or false?
Answer : B
Explanation
This statement is correct.
