Basic Verbs Interview Questions


Words -

What is a word?

A COBOL word is a set of characters, and each character is from the character set - A to Z, 0 to 9, - (hyphen), _ (underscore).

Variable -

Explain COBOL data names or variables?

A Variable is used to store and process the value. A Variable is also called a data item. For Example - WS-A, WS-VAR, WS-TOTAL, WS-INPUT, WS_OUTPUT, etc.

Literal -

What are literals?

The literal is the value that is assigned to the variable.

Literal -

What is a constant variable?

A variable is initialized with a literal. If the variable value doesn't change during the program's execution, the variable is considered as a constant variable, and the value is considered as a constant value.

What is a figurative-constant? What are they?

System-defined constants are predefined in the COBOL and used as replacements for standard values like spaces, zeroes, etc. They are -

  • ZERO, ZEROS, ZEROES
  • SPACE, SPACES
  • HIGH-VALUE, HIGH-VALUES
  • LOW-VALUE, LOW-VALUES
  • QUOTE, QUOTES
  • ALL

Comments -

What is a comment?

A comment is a non-executable statement that provides the information about code or business requirements.

How many types of comments are available in COBOL?

These are three types based on their usage and where they are used -

  • IDENTIFICATION DIVISION Comments
  • Full line comments (any division)
  • Floating comment indicator (*>)

Common Questions -

What types of data in COBOL that indicate the compiler’s intent to use the data?

Numeric, alphabetic, and alpha-numeric

What is the aim of using constants and variables in programming?

The aim of using constants and variables in programming is to store and manipulate data within a program to perform calculations, make decisions, and control program flow effectively.

Frequently Asked Questions -

How are COBOL data names defined?

What do you mean by literals?
How do literals work?

What is constant value?

What is a variable, literal, constant in COBOL?