
- COBOL Tutorial
- 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 Useful Resources
- COBOL - Questions and Answers
- COBOL - Quick Guide
- COBOL - Useful Resources
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
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
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.
Q 3 - In which division, Input-Output section?
Answer : B
Explanation
Input-Output section comes under Environment division which provides information about the files to be used in the program.
Q 4 - Which of the following word cannot be a user-defined COBOL word?
Answer : B
Explanation
ACCEPT cannot be a user defined COBOL word as we cannot use COBOL reserved words.
Q 5 - What is the output of following program?
IDENTIFICATION DIVISION. PROGRAM-ID. HELLO. DATA DIVISION. WORKING-STORAGE SECTION. 01 WS-NUM PIC 9(3). 88 PASS VALUES ARE 041 THRU 100. 88 FAIL VALUES ARE 000 THRU 40. PROCEDURE DIVISION. A000-FIRST-PARA. MOVE 65 TO WS-NUM. IF PASS DISPLAY 'Passed with ' WS-NUM ' marks'. IF FAIL DISPLAY 'FAILED with ' WS-NUM 'marks'. STOP RUN.
Answer : B
Explanation
WS-NUM contains 65 so PASS condition is satisfied as values lies in range of 041 to 100.
You can try same code using Try it option available below:
IDENTIFICATION DIVISION. PROGRAM-ID. HELLO. DATA DIVISION. WORKING-STORAGE SECTION. 01 WS-NUM PIC 9(3). 88 PASS VALUES ARE 041 THRU 100. 88 FAIL VALUES ARE 000 THRU 40. PROCEDURE DIVISION. A000-FIRST-PARA. MOVE 65 TO WS-NUM. IF PASS DISPLAY 'Passed with ' WS-NUM ' marks'. IF FAIL DISPLAY 'FAILED with ' WS-NUM 'marks'. STOP RUN.
Q 6 - How many times following B-para loop will execute?
IDENTIFICATION DIVISION. PROGRAM-ID. HELLO. DATA DIVISION. WORKING-STORAGE SECTION. 01 WS-A PIC 9 VALUE 0. PROCEDURE DIVISION. A-PARA. PERFORM B-PARA VARYING WS-A FROM 1 BY 1 UNTIL WS-A=5 STOP RUN. B-PARA. DISPLAY 'IN B-PARA ' WS-A.
Answer : B
Explanation
B-para will execute for 4 times as value of WS-A is 1 in starting and we are incrementing it by 1 in each iteration. Here condition is WS-A=5 and when this condition will be satisfied it will come out of the loop. So B-para will be executed 4 times.
You can try same code using Try it option available below:
IDENTIFICATION DIVISION. PROGRAM-ID. HELLO. DATA DIVISION. WORKING-STORAGE SECTION. 01 WS-A PIC 9 VALUE 0. PROCEDURE DIVISION. A-PARA. PERFORM B-PARA VARYING WS-A FROM 1 BY 1 UNTIL WS-A=5 STOP RUN. B-PARA. DISPLAY 'IN B-PARA ' WS-A.
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 of the following is not a figurative constant?
Answer : B
Explanation
Comma is not a figurative constant. Figurative constants are constant values.
Q 9 - Where does Column numbers in COBOL start from?
Answer : A
Explanation
01-07 are reserved for line numbers.
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.