- 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
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.
Answer : D
Explanation
77 level is an elementary level item which cannot be subdivided.
Q 2 - Under which section we should make an entry in the program for a SORT file?
Answer : B
Explanation
For sorting a file, we should make an SD entry in File Section.
Q 3 - Which of the following statement will give you ‘Tutorials’ in TutorialsPoint string?
Answer : A
Explanation
In STRING(A,B), A is the staring position and B id the number of digits to select.
Q 4 - What is the output of following program?
IDENTIFICATION DIVISION. PROGRAM-ID. HELLO. DATA DIVISION. WORKING-STORAGE SECTION. 01 WS-NUM1 PIC X(4) VALUE '15AB'. PROCEDURE DIVISION. MOVE 'XXXX' TO WS-NUM1 DISPLAY WS-NUM1. STOP RUN.
Answer : B
Explanation
Value of WS-NUM1 will be displayed. While declaring the WS-NUM1 variable we have set the value as '15AB' but in the procedure division we have moved 'XXXX' value in WS-NUM1. So XXXX value is displayed.
You can try same code using Try it option available below:
IDENTIFICATION DIVISION. PROGRAM-ID. HELLO. DATA DIVISION. WORKING-STORAGE SECTION. 01 WS-NUM1 PIC X(4) VALUE '15AB'. PROCEDURE DIVISION. MOVE 'XXXX' TO WS-NUM1 DISPLAY WS-NUM1. STOP RUN.
Q 5 - What is the output of following program?
IDENTIFICATION DIVISION. PROGRAM-ID. HELLO. DATA DIVISION. WORKING-STORAGE SECTION. 01 WS-NUMA PIC 9(9) VALUE 100. 01 WS-NUMB PIC 9(9) VALUE 15. 01 WS-NUMC PIC 9(2). 01 WS-REM PIC 9(2). PROCEDURE DIVISION. DIVIDE WS-NUMA BY WS-NUMB GIVING WS-NUMC REMAINDER WS-REM. DISPLAY WS-NUMC ', ' WS-REM STOP RUN.
Answer : A
Explanation
Formula will be like WS-NUMC = NUMA/NUMB and remainder will be stored in WS-REM.
You can try same code using Try it option available below:
IDENTIFICATION DIVISION. PROGRAM-ID. HELLO. DATA DIVISION. WORKING-STORAGE SECTION. 01 WS-NUMA PIC 9(9) VALUE 100. 01 WS-NUMB PIC 9(9) VALUE 15. 01 WS-NUMC PIC 9(2). 01 WS-REM PIC 9(2). PROCEDURE DIVISION. DIVIDE WS-NUMA BY WS-NUMB GIVING WS-NUMC REMAINDER WS-REM. DISPLAY WS-NUMC ', ' WS-REM STOP RUN.
Q 6 - Set statement is used to change the index value. Set verb is used to initialize, increment or decrement the index value. Is this statement true or false?
Answer : B
Explanation
This statement is true and it is used with Search and Search All to locate elements in table.
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 - Dynamic Call occurs when a program is compiled with the DYNAM and NODLL compiler option. A dynamic called program is loaded into storage at runtime. Is this statement true or false?
Answer : B
Explanation
This statement is correct.
Q 9 - Where does Column numbers in COBOL start from?
Answer : A
Explanation
01-07 are reserved for line numbers.
Q 10 - Sign condition is used to check the sign of a numeric operand. It determines whether a given numeric value is greater than, less than, or equal to ZERO. State whether true or false?
Answer : B
Explanation
This statement is correct.
To Continue Learning Please Login
Login with Google