COBOL Mocktest-2

20 Questions | Attempts: 8683
Share

SettingsSettingsSettings
COBOL Quizzes & Trivia

Questions and Answers
  • 1. 

     Not a valid form of state to perform statement

    • A.

      PERFORM P1 3 TIMES.

    • B.

      PERFORM P1 VARYING I FROM 1 BY 1 UNTIL I >0.

    • C.

      PERFORM P1 THRU P2.

    • D.

      PERFORM P1 THRICE

    Correct Answer
    D. PERFORM P1 THRICE
  • 2. 

    At one Time One Record is written into the File?

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
  • 3. 

    Can we close more than one file by using single CLOSE statement?

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
  • 4. 

    Which of the following is true?

    • A.

      The SELECT clause appears in the I-O-CONTROL paragraph of DATA DIVISION.

    • B.

      The SELECT clause appears in the I-O-CONTROL paragraph of FILE SECTION of DATA DIVISION.

    • C.

      SELECT clause appears in the FILE SECTION of ENVIRONMENT DIVISON.

    • D.

      SELECT clause appears in the FILE-CONTROL paragraph of the INPUT-OUTPUT section of the ENVIRONMENT DIVISON.

    Correct Answer
    D. SELECT clause appears in the FILE-CONTROL paragraph of the INPUT-OUTPUT section of the ENVIRONMENT DIVISON.
  • 5. 

    If  we use STOP RUN in sub routine what happens?

    • A.

      If we use STOP RUN in the sub routine then control returns to the main program.

    • B.

      If we use STOP RUN in the sub routine then control not returns to the main program.

    • C.

      If we use STOP RUN in the sub routine then control terminates.

    Correct Answer
    B. If we use STOP RUN in the sub routine then control not returns to the main program.
  • 6. 

    A Table has a Single Attribute Whereas a Record in a File has Multiple Attributes

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
  • 7. 

    Write the syntax of Reference Modification.

    • A.

      Dataname:name

    • B.

      Dataname(beginning position:length)

    • C.

      Dataname

    Correct Answer
    B. Dataname(beginning position:length)
  • 8. 

    The use of PERFORM statement within the range of another PERFORM statement is allowed

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
  • 9. 

    Before SEARCH ALL tables should be in sorted order.

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
  • 10. 

     _________ Compiler option would you use for dynamic linking.

    Correct Answer
    DYNAM
  • 11. 

    The VALUE clause cannot be specified along with the OCCURS clause

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
  • 12. 

    ________Used only if the File is Opened in the I-O Mode.

    • A.

      WRITE

    • B.

      READ

    • C.

      REWRITE

    • D.

      NONE

    Correct Answer
    C. REWRITE
  • 13. 

    COBOL processes multiple records at a time.

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
  • 14. 

    To WRITE into a file which mode is used.

    • A.

      I/O mode

    • B.

      EXTEND mode

    • C.

      Both

    • D.

      None.

    Correct Answer
    B. EXTEND mode
  • 15. 

    _________ verb initiates file processing.

    • A.

      OPEN

    • B.

      READ

    • C.

      WRITE

    • D.

      None.

    Correct Answer
    A. OPEN
  • 16. 

    ________ verb used for updating records.

    • A.

      INPUT

    • B.

      OUTPUT

    • C.

      I-O

    • D.

      EXTEND

    Correct Answer
    C. I-O
  • 17. 

    PERFORM PARA-1 N TIMES. If N has a value zero then how many times PARA-1 will execute?

    • A.

      1 TIMES

    • B.

      0 TIMES

    • C.

      2 TIMES

    Correct Answer
    B. 0 TIMES
  • 18. 

    Initially I = 5.         PERFORM PARA-1 I TIMES.         PARA-1.                   DISPLAY ‘ HELLO ‘                   MOVE 2 TO I.          How many times PARA-1 will execute? ______________.

    • A.

      5 TIMES

    • B.

      3 TIMES

    • C.

      4 TIMES

    Correct Answer
    A. 5 TIMES
  • 19. 

    19. PERFORM with ____________ option is used when a nesting repetition of the range is required while varying more than one identifier.

    • A.

      VARYING UNTIL

    • B.

      VARYING

    • C.

      VARYING-AFTER

    Correct Answer
    C. VARYING-AFTER
  • 20. 

    20. The __________ statement replaces the last record read.

    • A.

      READ/WRITE

    • B.

      READ

    • C.

      WRITE

    Correct Answer
    C. WRITE

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Jan 28, 2013
    Quiz Edited by
    ProProfs Editorial Team
  • Jun 25, 2011
    Quiz Created by
    Sharmiladevi
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.