Question 1
All of the following are example of debugging techniques except for
Answer
desk checking
compiling
program walkthrough
executing
documentation
Question 2
A pictorial representation of the logic of a program is given by
Answer
pseudocode
flow chart
hierarchy chart
printer spacing chart
object code
Question 3
This planning tool shows relationships among sections in a program:
Answer
pseudocode
flow chart
hierarchy chart
printer spacing chart
record layout form
Question 4
An example of a syntax error is:
Answer
attempting to divide by zero
trying to read a file that cannot be found
coding an ADD instruction instead of a MULTIPLY instruction
coding a series of steps in the wrong sequence
misspelling ADD as AD
Question 5
The division in a COBOL program that contains the executable code is called:
Answer
IDENTIFICATION division
DATA division
EQUIPMENT division
PROCEDURE division
ENVIRONMENT division
Question 6
All of the following is true about the IDENTIFICATION DIVISION except:
Answer
It is divided into sections.
It is the first division in a COBOL program.
It contains no executable code.
A required paragraph is PROGRAM-ID.
Every COBOL program must have this division.
Question 7
Which of the following is NOT a legal user-defined COBOL data name?
Answer
EMPLOYEE-NAME
DATE
TEST1
INVENTORY-FILE
AMOUNT-OF-INVENTORY
Question 8
Each of the following is a rule for forming user-defined words except:
Answer
at least one alphabetic character
no more than 30 characters
letters, digits, underscores, hyphens, ampersands only
no embedded blanks
no COBOL reserved words
Question 9
Which of the following statements is true about a systems analyst?
Answer
The analyst s job is to design an efficient business information system.
The analyst should have considerable computer expertise.
The analyst determines inputs and outputs of the system.
The analyst writes program specifications.
All of the above.
Question 10
Which of the following clauses is legal?
Answer
PICT IS 9999.
PICTURE AAA.
PICTURE IS 9A9A.
PIC 5(A).
PIC X5.
Question 11
Which of the following is recommended coding style?
Answer
PIC clauses should be aligned.
Use X rather than A in PIC clauses for non-numeric items.
If parentheses are used to denote the size of a field, no spaces should appear within the parentheses.
If digits are in a field that will not be used for arithmetic, code them as X.
All of the above are recommended.
Question 12
Which of the following is a valid numeric literal?
Answer
-68.
3.1415-
$1,000.00
123456789012345678
12.34.56
Question 13
Which of the following is a valid non-numeric literal?
Answer
32.58
1234
EMPLOYEE-NAME
JOHNSON
SPACES
Question 14
Which of the following is NOT true about OPEN statements?
Answer
An OPEN statement specifies whether a file will be used for input or output.
An OPEN statement accesses the specific device the file is found on.
An input file must be opened before it can be read.
Fully interactive programs with keyboard input and screen output require this statement.
Every file that is defined by a SELECT statement in the ENVIRONMENT DIVISION must be opened in the PROCEDURE DIVISION.
Question 15
A file-name specified in a READ statement also appears in which of the following statements?
Answer
OPEN statement
SELECT statement
CLOSE statement
FD entry
All of the above
Question 16
Which of the following is executed first?
Answer
STOP RUN
OPEN
READ
CLOSE
WRITE
Question 17
What statement is NOT found in a fully interactive program?
Answer
ACCEPT
PERFORM
STOP RUN
OPEN
DISPLAY
Question 18
Which of the following is executed last?
Answer
STOP RUN
READ
MOVE
CLOSE
OPEN
Question 19
The AT END clause in a READ statement has the following function:
Answer
It is executed when the READ is successful.
It is executed when there is no data left to read.
It tells the computer what to do when a record is read.
It is executed every time a record is read.
After a record is processed, this clause is executed.
Question 20
Which statement is required in fully interactive programs?
Answer
OPEN
READ
WRITE
CLOSE
STOP RUN
Question 21
Which of the following is TRUE about hierarchy charts?
Answer
They map out program logic.
They illustrate top-down design.
They are used to verify program logic.
They are pictorial representations of the logical control structures.
They are language-dependent.
Question 22
The control structure that causes instructions to be executed in the order they appear is called
Answer
sequence
selection
iteration
case structure
subroutines
Question 23
The control structure that causes an instruction to be executed depending on the existence of a condition is called
Answer
sequence
selection
iteration
case structure
subroutines
Question 24
The in-line PERFORM UNTIL is an illustration of the following control structure:
Answer
sequence
selection
iteration
case structure
subroutines
Question 25
The IF-THEN-ELSE statement is an illustration of the following control structure:
Answer
sequence
selection
iteration
case structure
subroutines
Question 26
EVALUATE is an illustration of the following control structure:
Answer
sequence
selection
iteration
case structure
subroutines
Question 27
The control structure that causes the execution of one of numerous sets of instructions depending on the contents of a given field is called:
Answer
sequence
selection
iteration
case structure
subroutines
Question 28
Which of the following is NOT TRUE about a hierarchy chart?
Answer
It illustrates how modules relate to one another.
It is called a Visual Table of Contents.
It depicts the actual sequence of instructions.
It shows when a module is executed from more than one point in a program.
It provides a graphic overview of a program.
Question 29
Which of the following is an example of a logic error?
Answer
OPEN EMPLOYEE-FILE
ACCCEPT EMPLOYEE-NAME
Using a field in the PROCEDURE DIVISION that has not been defined in the DATA DIVISION
A missing period
Adding two values when they should be multiplied
Question 30
Which of the following is an example of a syntax error?
Answer
OPEN EMPLOYEE-FILE
Specifying the wrong drive for an input file
Adding two values when they should be multiplied
Infinite loop
Alphanumeric data in a numeric field
Question 31
Which of the following is NOT true about top-down programming?
Answer
Hierarchy charts are used to illustrate this approach.
It is also called stepwise-refinement.
It is a technique of structured programming.
The details are coded first.
Modules are coded in hierarchical order.
Question 32
Which of the following is NOT true about pseudocode?
Answer
It should be prepared before a program is coded.
It uses symbols similar to those in a flowchart.
It is the most common structured programming planning tool.
It has been designed to represent logical control structures.
It is language independent.
Question 33
Which of the following is NOT a logical control structure used in structured programming?
Answer
unconditional branches
sequence
iteration
case structure
selection
Question 34
Which of the following is NOT an acceptable key term used to define logical control structures in pseudocode?
Answer
IF-THEN...END-IF
GOTO...END-GOTO
EVALUATE...END-EVALUATE
PERFORM UNTIL...END-PERFORM
IF-THEN-ELSE...END-IF
Question 35
Which of the following is TRUE about moving portions to the left of the decimal point in numeric fields?
Answer
Decimal alignment is always maintained.
No portion of the original contents of the receiving field is retained after the MOVE is executed.
When the receiving field is larger than the sending field, the non-filled positions are replaced with zeros.
When the receiving field is smaller than the sending field, truncation occurs on the left.
All of the above.
Question 36
All the MOVEs except which one are NON-NUMERIC?
Answer
moving a numeric field to an alphanumeric field
moving a numeric field to a numeric field
moving an alphabetic field to an alphabetic field
moving an alphanumeric literal to an alphanumeric field
moving ZEROS to an alphanumeric field
Question 37
ZEROS may NOT be moved to which of the following fields?
Answer
numeric field with integer portion only
alphabetic
alphanumeric
group field
numeric
Question 38
Which of the following editing functions may be performed on an alphanumeric field?
Answer
printing of spaces or zeros as separators within fields
suppression of leading zeros
printing of dollar signs and commas
printing of plus or minus signs
printing of asterisks for check protection
Question 39
Which of the following editing functions may NOT be performed on a numeric field?
Answer
printing of debit or credit symbols for accounting applications
suppression of leading zeros
printing of dollar signs and commas
printing of plus or minus signs
insertion of # signs
Question 40
To print the value -123 which of the following PIC clauses can NOT be used?
Answer
+ZZ9
+999
-ZZ9
-999
ZZ9CR
Question 41
Which of the following is NOT a valid PIC clause?
Answer
ZZ9DB
CRZZ9
+ZZ9
ZZ9-
9B9B9
Question 42
Which of the following is NOT true about floating string characters?
Answer
$ may be floated.
+ may be floated.
There may be two floating string characters in a PIC clause.
A floating string character is usually the leftmost character in the PIC clause.
- may be floated.
Question 43
If a sending field has PIC 9(4)V99 with value 0012 ^ 34, to print this as bbb$12.34, the report-item must have which of the following PIC clauses?
Answer
$Z,ZZ9.99
$$9.99
ZZZ$Z9.99
$,$9.99
$,$9.99
Question 44
Which of the following WRITE formats is NOT correct?
Answer
WRITE PRINT-REC ON NEW-PAGE
WRITE PRINT-REC.
WRITE PRINT-REC FROM MAIN-LABEL-LINE.
WRITE PRINT-REC BEFORE ADVANCING 2 LINES.
WRITE PRINT-REC AFTER ADVANCING 2 LINES.
Question 45
COBOL permits which of the following for well-designed reports?
Answer
double-spacing
pagination
using a computer system supplied date
calculating and printing totals
All of the above.
Question 46
Which of the following is NOT a figurative constant?
Answer
ZEROS
SPACES
QUOTE
DATE
ZERO
Question 47
Which of the following is NOT a character that can be used in a PIC clause for a report-item?
Answer
¢
Z
.
+
/
Question 48
Which of the following symbols is used for LEADING zero suppression?
Answer
S
#
*
Z
b
Question 49
A report may have all of the following EXCEPT:
Answer
column footing
page footing
report heading
column heading
page heading
Question 50
Which PIC symbol is used to store a sign for a numeric field used for computation?
Answer
+
-
S
Z
*