COBOL Interview Questions and Answers
Ques 1. What is COBOL?
COBOL (Common Business-Oriented Language) is a high-level programming language used primarily for business, finance, and administrative systems.
Ques 2. Explain the Division structure in COBOL.
The Division structure in COBOL consists of Identification, Environment, Data, and Procedure divisions. These divisions help organize the program's structure.
Ques 3. What is the significance of the PERFORM statement?
The PERFORM statement is used for loop control in COBOL. It allows the repeated execution of a set of statements until a specified condition is met.
Example:
PERFORM 5 TIMES
DISPLAY 'Hello, World!'
END-PERFORM.
Ques 4. Differentiate between COMP and COMP-3 in COBOL.
COMP and COMP-3 are data types in COBOL. COMP is used for binary representation, while COMP-3 is used for packed decimal representation.
Ques 5. What is the purpose of the INITIALIZE verb?
The INITIALIZE verb is used to set the initial values for data items in COBOL. It initializes numeric items to zero and alphanumeric items to spaces.
Example:
01 COUNT PIC 9(3).
INITIALIZE COUNT.
Most helpful rated by users: