COBOL Programming and Programming Fundamentals
Test your knowledge of COBOL programming language syntax, control structures, and general programming concepts including ASCII encoding and conditional logic.
Questions
How many comparisons can a single COBOL if statement make?
- 1
- 2
- There is no limit
- COBOL if statements are not used to compare variable values
Which of the following errors are possible within a COBOL if statement?
- Infinite loop
- Logical Error
- Runtime error
- All of the above
The COBOL perform loop is the equivalent of which of the following structures found in other languages, such as Java or C++
- For loop
- Do-While loop
- Method
- None of the above
If someone wanted a COBOL perform "loop" to execute once before the condition is checked, which of the following would they do?
- Use a standard perform statement
- Use an in line perform
- Skillful use of the COBOL reserved word "AFTER"
- This is not possible in COBOL
A = 0, B = 9….. Perform until a > b Add 2 to a End-perform How many additions are performed?
- 3
- 4
- 5
- 6
If an IF statement is true, what’s the first thing it does?
- Exits the statement
- Executes the function
- Exits the Program
- Executes the If statement again
Not negative means
- Equal to 0
- Greater than or equal to 1
- Less than or equal to 0
- Greater than or equal to 0
Which of the following is NOT a valid symbol to use in an IF condition
- =
- =<
- =>
- >
Which is the correct ASCII collating sequence?
- spaces, special characters, 0-9, A-Z, a-z
- spaces, a-z, A-Z, 0-9, special characters
- a-z, A-Z, 0-9, spaces, special characters
- 0-9, special characters, spaces, a-z, A-Z
The word COBOL is an acronym for what?
- It is not an acronym.
- COmputer Basic Operating Language
- COmmon Business Oriented Language
- Common OBservation Official Language