Show List
Quiz - COBOL - 2
Select the right answer for below questions:
Which of the following is not a valid COBOL conditional statement?
IF
WHILE
EVALUATE
PERFORM
PERFORM
What is the purpose of the “FILE SECTION” in COBOL?
To define input and output files used in the program
To define the layout of data structures used in the program
To define constants and literals used in the program
To define the main procedure of the program
To define input and output files used in the program
Which of the following is not a COBOL looping statement?
PERFORM
EVALUATE
WHILE
REPEAT
EVALUATE
What is the purpose of the “CONTINUE” statement in COBOL?
To continue execution after a loop or conditional statement
To jump to a different section of code
To terminate the program
To indicate the end of a program
To continue execution after a loop or conditional statement
In COBOL, what is the maximum level number that can be used to define a data structure?
77
88
99
999
99
What is the purpose of the “ALTER” statement in COBOL?
To modify the layout of a data structure
To perform a calculation on a variable
To move data between variables
To redefine a variable
To modify the layout of a data structure
In COBOL, what is the syntax for declaring a variable named “NAME” of type “ALPHANUMERIC” with a length of 20 characters?
01 NAME PIC X(20).
01 NAME PIC A(20).
01 NAME PIC AN(20).
01 NAME PIC ALPHA(20).
01 NAME PIC AN(20).
Which of the following is not a COBOL string manipulation function?
LENGTH
SUBSTRING
REPLACE
INSTR
INSTR
In COBOL, what is the purpose of the “BLANK WHEN ZERO” phrase in a data definition?
To indicate that the variable is a pointer
To declare a variable constant
To initialize the variable to a default value
To suppress leading zeros in output
To suppress leading zeros in output
What is the purpose of the “GLOBAL” keyword in a COBOL data definition?
To indicate that the variable is a pointer
To indicate that the variable is a constant
To make the variable accessible from any part of the program
To indicate that the variable is an array
To make the variable accessible from any part of the program
Submit
Retry
{"qz1-232134":"PERFORM","qz1-232135":"To define input and output files used in the program","qz1-232136":"EVALUATE","qz1-232137":"To continue execution after a loop or conditional statement","qz1-232138":"99","qz1-232139":"To modify the layout of a data structure","qz1-232140":"01 NAME PIC AN(20).","qz1-232141":"INSTR","qz1-232142":"To suppress leading zeros in output","qz1-232143":"To make the variable accessible from any part of the program"}
Leave a Comment