Statement Categories Interview Questions


How many types of statement categories?

All COBOL statements are divided into four categories based on their actions, and they are -

  • Imperative Statements
  • Conditional Statements
  • Delimited scope statements
  • Compiler-directing statements

What are the imperative statements in COBOL?

It is a procedural instruction specifying an action to be taken during the program's execution.

What are the conditional statements in COBOL?

A Conditional statement tests a condition and then executes one or more statements based on the result of that condition.

Explain what a scope terminator is?

Delimited Scope Statement marks the statement ending by specific keywords.

Under what circumstances are scope terminators mandatorily needed?

This type of statement improves the readability and structure of programs by providing a clear scope of where a particular logic ends.

What are types of scope terminator?

These are two types -

  • Explicit Scope terminators - It mark the end of a statement or block of code. They are not common and are specific only to the statement.
  • Implicit Scope terminators - It (.) is used to end the statement implicitly and is used to terminate all statements.

Describe some command terminators examples?

END-IF, END-CALL, END-COMPUTE, etc.

What are the compiler-directive statements?

It provide instructions to the compiler about how to compile the source program.

Frequently Asked Questions -

What is a scope terminator?
What is a scope terminator? Explain its types?

When is the use of a scope terminator required?
When and why do you use a scope terminator?
When is the need for scope terminators mandatory?

Give some examples of command terminators?