Program Structure Interview Questions


Explain the COBOL Program Structure?

COBOL program structure is a top-to-bottom hierarchical design, consisting of Divisions, Sections, Paragraphs, Sentences, Statements, and Character strings.

What is a statement in COBOL?

A COBOL statement is a combination of COBOL keywords and operands. It's important to note that a statement should always include at least one COBOL keyword, as these keywords are the building blocks of the COBOL programming language.

What is sentence in COBOL?

A sentence is a sequence of two or more statements ended by a period (.). It provides a way to group related statements together, and the explicit scope terminator (period) indicates the end of the sentence.

What is a paragraph in COBOL?

A paragraph is a block of code consisting of one or more sentences or statements. It represents a logical code unit and can be called or performed by other parts of the program.

What is a section?

A section is a collection of one or more related paragraphs within the PROCEDURE DIVISION. Sections are coded by a name followed by the keyword SECTION. It ends at another section starting or ending the program.

What is a division?

A division is a collection of one or more sections and paragraphs. Division begins with the division name and ends at the beginning of the subsequent division or the program ends.

Frequently Asked Questions -

How to create a structured COBOL program?

What is a COBOL paragraph?

What guidelines should be followed to write a structured COBOL program?

What is the difference between performing a SECTION and a PARAGRAPH?