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.

10 Questions Published

Questions

Question 1 Multiple Choice (Multiple Answers)

How many comparisons can a single COBOL if statement make?

  1. 1
  2. 2
  3. There is no limit
  4. COBOL if statements are not used to compare variable values
Question 2 Multiple Choice (Multiple Answers)

Which of the following errors are possible within a COBOL if statement?

  1. Infinite loop
  2. Logical Error
  3. Runtime error
  4. All of the above
Question 3 Multiple Choice (Multiple Answers)

The COBOL perform loop is the equivalent of which of the following structures found in other languages, such as Java or C++

  1. For loop
  2. Do-While loop
  3. Method
  4. None of the above
Question 4 Multiple Choice (Multiple Answers)

If someone wanted a COBOL perform "loop" to execute once before the condition is checked, which of the following would they do?

  1. Use a standard perform statement
  2. Use an in line perform
  3. Skillful use of the COBOL reserved word "AFTER"
  4. This is not possible in COBOL
Question 5 Multiple Choice (Multiple Answers)

A = 0, B = 9….. Perform until a > b Add 2 to a End-perform How many additions are performed?

  1. 3
  2. 4
  3. 5
  4. 6
Question 6 Multiple Choice (Multiple Answers)

If an IF statement is true, what’s the first thing it does?

  1. Exits the statement
  2. Executes the function
  3. Exits the Program
  4. Executes the If statement again
Question 7 Multiple Choice (Multiple Answers)

Not negative means

  1. Equal to 0
  2. Greater than or equal to 1
  3. Less than or equal to 0
  4. Greater than or equal to 0
Question 8 Multiple Choice (Multiple Answers)

Which of the following is NOT a valid symbol to use in an IF condition

  1. =
  2. =<
  3. =>
  4. >
Question 9 Multiple Choice (Multiple Answers)

Which is the correct ASCII collating sequence?

  1. spaces, special characters, 0-9, A-Z, a-z
  2. spaces, a-z, A-Z, 0-9, special characters
  3. a-z, A-Z, 0-9, spaces, special characters
  4. 0-9, special characters, spaces, a-z, A-Z
Question 10 Multiple Choice (Multiple Answers)

The word COBOL is an acronym for what?

  1. It is not an acronym.
  2. COmputer Basic Operating Language
  3. COmmon Business Oriented Language
  4. Common OBservation Official Language