COBOL

50 Questions | Attempts: 443
Share

SettingsSettingsSettings
COBOL - Quiz

COBOL


Questions and Answers
  • 1. 

    Conditions can be specified in which LEVEL?

    • A.

      LEVEL 66

    • B.

      LEVEL 77

    • C.

      LEVEL 88

    • D.

      LEVEL 01

    Correct Answer
    C. LEVEL 88
  • 2. 

    In order to rewrite an ESDS file in which of the following modes it should be opened:

    • A.

      INPUT

    • B.

      OUTPUT

    • C.

      I-O

    • D.

      EXTEND

    Correct Answer
    D. EXTEND
  • 3. 

    Column 7 is called as:

    • A.

      Indicator

    • B.

      Level

    • C.

      Area A

    • D.

      Margin B

    Correct Answer
    A. Indicator
  • 4. 

    Which character is used to indicate a commented line in COBOL?

    • A.

      /*

    • B.

      //*

    • C.

      //

    • D.

      *

    Correct Answer
    D. *
  • 5. 

    Which of the following is used to indicate the end of a paragraph?

    • A.

      END-PARA

    • B.

      EXIT

    • C.

      RETURN

    • D.

      STOP RUN

    Correct Answer
    B. EXIT
  • 6. 

    When you will get the File Status Code 39 ?

    • A.

      READ

    • B.

      WRITE

    • C.

      OPEN

    • D.

      DELETE

    Correct Answer
    C. OPEN
  • 7. 

    Which DIVISION cannot not have a SECTION?

    • A.

      IDENTIFICATION

    • B.

      ENVIRONMENT

    • C.

      DATA

    • D.

      PROCEDURE

    Correct Answer
    A. IDENTIFICATION
  • 8. 

    Which DIVISION cannot have a PARAGRAPH?

    • A.

      IDENTIFICATION

    • B.

      ENVIRONMENT

    • C.

      DATA

    • D.

      PROCEDURE

    Correct Answer
    C. DATA
  • 9. 

    01 A PIC 9(7) USAGE ___ takes 4 Bytes that what is the usage ?

    • A.

      DISPLAY

    • B.

      COMP-2

    • C.

      COMP-3

    • D.

      COMP-4

    Correct Answer(s)
    C. COMP-3
    D. COMP-4
  • 10. 

    Which of the following allows to implement CASE structure?

    • A.

      PERFORM

    • B.

      SWITCH

    • C.

      EVALUATE

    • D.

      INSPECT

    Correct Answer
    C. EVALUATE
  • 11. 

    Which of the following can execute a statement with or without a condition one or more times?

    • A.

      EVALUATE

    • B.

      PERFORM

    • C.

      IF

    • D.

      INSPECT

    Correct Answer
    B. PERFORM
  • 12. 

    The maximum value that a subscript can take is determined by

    • A.

      REDEFINES

    • B.

      RENAMES

    • C.

      OCCURS

    • D.

      POINTER

    Correct Answer
    C. OCCURS
  • 13. 

    Which one is used to represent data from a different program?

    • A.

      INPUT-OUTPUT SECTION

    • B.

      CONFIGURATION SECTION

    • C.

      LINKAGE SECTION

    • D.

      EXTERNAL SECTION

    Correct Answer
    C. LINKAGE SECTION
  • 14. 

    Which one is FALSE?

    • A.

      Dataname cannot have more than 30 characters

    • B.

      Dataname can have a under score

    • C.

      Dataname cannot end with hyphen

    • D.

      Dataname cannot start with a number

    Correct Answer
    B. Dataname can have a under score
  • 15. 

    The SELECT statement is coded in

    • A.

      WORKING STORAGE SECTION

    • B.

      CONFIGURATION SECTION

    • C.

      INPUT-OUTPUT SECTION

    • D.

      FILE SECTION

    Correct Answer
    C. INPUT-OUTPUT SECTION
  • 16. 

    The following code will execute the para how many times? PERFORM PARA-A VARYING I FROM 1 BY 1 UNTIL I>20       AFTER J FROM 1 BY 1 UNTIL J>5

    • A.

      0 times

    • B.

      100 times

    • C.

      80 times

    • D.

      76 times

    Correct Answer
    B. 100 times
  • 17. 

    Which of the following is NOT a figurative constant

    • A.

      ZERO

    • B.

      FILLER

    • C.

      SPACE

    • D.

      LOW-VALUE

    Correct Answer
    B. FILLER
  • 18. 

    Which of the following is NOT a valid class condition?

    • A.

      DECIMAL

    • B.

      NUMERIC

    • C.

      ALPHABETIC

    • D.

      ALPHABETIC-UPPER

    Correct Answer
    A. DECIMAL
  • 19. 

    Which of the following is NOT a valid sign condition?

    • A.

      NUMERIC

    • B.

      POSITIVE

    • C.

      NEGATIVE

    • D.

      ZERO

    Correct Answer
    D. ZERO
  • 20. 

    How many times 'HI' will displayed for the following code? MOVE 3 TO I PERFORM WITH TEST AFTER UNTIL I > 5    DISPLAY 'HI'    ADD 1 TO I END-PERFORM

    • A.

      0

    • B.

      1

    • C.

      3

    • D.

      Infinite

    Correct Answer
    C. 3
  • 21. 

    Which statement is used to simulate the carriage return in reports?

    • A.

      ADVANCING

    • B.

      CARRIAGE

    • C.

      RETURN

    • D.

      CRLF

    Correct Answer
    A. ADVANCING
  • 22. 

    Which of the following is NOT a part of IDENTIFICATION DIVISION?

    • A.

      DATE-WRITTEN

    • B.

      SOURCE-COMPUTER

    • C.

      AUTHOR

    • D.

      DATE-COMPILED

    Correct Answer
    B. SOURCE-COMPUTER
  • 23. 

    SPECIAL-NAMES is a paragraph found in

    • A.

      IDENTIFICATION DIVISION

    • B.

      ENVIRONMENT DIVISION

    • C.

      DATA DIVISION

    • D.

      There is no such paragraph in COBOL

    Correct Answer
    B. ENVIRONMENT DIVISION
  • 24. 

    Which statement can be used to add records to the end of file in COBOL?

    • A.

      WRITE

    • B.

      APPEND

    • C.

      REWRITE

    • D.

      RETURN

    Correct Answer
    A. WRITE
  • 25. 

    In a two dimensional table, the first subscript can be used to access

    • A.

      Minor level of the OCCURS clause

    • B.

      Major level of the OCCURS clause

    • C.

      First subscript is not necessary

    • D.

      Second subscript is necessary Second subscript is necessary Second subscript is necessary

    Correct Answer
    B. Major level of the OCCURS clause
  • 26. 

    Call by Reference allows sub program to change a copy of variable from callers storage

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
  • 27. 

    Access mode for both sequential and random is

    • A.

      SEQUENTIAL

    • B.

      RANDOM

    • C.

      DYNAMIC

    • D.

      DIRECT

    Correct Answer
    C. DYNAMIC
  • 28. 

    In a SORT procedure the statement to read the sort records are

    • A.

      RELEASE

    • B.

      READ

    • C.

      RETURN

    • D.

      START

    Correct Answer
    C. RETURN
  • 29. 

    Number of OCCURS clause needed for a two dimensional array

    • A.

      1

    • B.

      2

    • C.

      3

    • D.

      4

    Correct Answer
    B. 2
  • 30. 

    Consider the following COBOL statements:   PERFORM B VARYING I FROM 1 BY 1 UNTIL I > 5     AFTER VARYING B FROM 2 BY 3 UNTIL B >10

    • A.

      Will result in compiler error

    • B.

      Will result in run time error

    • C.

      It is a valid statement

    • D.

      Will result in infinite loop

    Correct Answer
    A. Will result in compiler error
  • 31. 

    Which of the following only elementary data element have

    • A.

      PIC

    • B.

      OCCURS

    • C.

      USAGE

    • D.

      VALUE

    Correct Answer
    C. USAGE
  • 32. 

    If stand alone COBOL program is coded with GOBACK instead of STOP RUN, then

    • A.

      Terminate abnormally

    • B.

      No difference

    • C.

      Infinite loop

    • D.

      Compiler error

    Correct Answer
    B. No difference
  • 33. 

    In order to update a record in an index file, it should be accessed in

    • A.

      INPUT mode

    • B.

      OUTPUT mode

    • C.

      I-O mode

    • D.

      EXTEND mode

    Correct Answer
    C. I-O mode
  • 34. 

    By using REWRITE command the length of the record can be increased from the currently read record upto the maximum record size in which of the VSAM datasets?

    • A.

      KSDS

    • B.

      ESDS

    • C.

      RRDS

    Correct Answer
    A. KSDS
  • 35. 

    How values are assigned to an index variable?

    • A.

      SET 1 TO I1

    • B.

      SET I1 TO 1

    • C.

      MOVE 1 TO I1

    • D.

      MOVE I1 TO 1

    Correct Answer
    B. SET I1 TO 1
  • 36. 

    If the given table subscript is beyond the range of array, the program will end abnormally

    • A.

      True

    • B.

      False

    • C.

      Depends on compiler option

    • D.

      Cant say

    Correct Answer
    C. Depends on compiler option
  • 37. 

    Subscript and index can be used together

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
  • 38. 

    Minimum number of divisions required in a COBOL program

    • A.

      1

    • B.

      2

    • C.

      3

    • D.

      4

    Correct Answer
    B. 2
  • 39. 

    An input procedure will release the record to sort the file rather than writing it

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
  • 40. 

    Which one of the following is a figurative constant?

    • A.

      ZERO

    • B.

      NULL

    • C.

      QUOTES

    • D.

      FILLER

    Correct Answer(s)
    A. ZERO
    C. QUOTES
  • 41. 

    Which should NOT begin in AREA A?

    • A.

      PARAGRAPH

    • B.

      SENTENCE

    • C.

      DIVISION

    • D.

      SECTION

    Correct Answer
    B. SENTENCE
  • 42. 

    Z is used to replace

    • A.

      Zeros

    • B.

      Blanks

    • C.

      Numbers

    • D.

      None of the above

    Correct Answer
    A. Zeros
  • 43. 

    Header and footers for a file can be specified using

    • A.

      STANDARD

    • B.

      HEADER

    • C.

      OMITTED

    • D.

      FOOTER

    Correct Answer(s)
    A. STANDARD
    C. OMITTED
  • 44. 

    Which DIVISIONS are mandatory in a COBOL ?

    • A.

      IDENTIFICATION

    • B.

      ENVIRONMENT

    • C.

      DATA

    • D.

      PROCEDURE

    Correct Answer(s)
    A. IDENTIFICATION
    C. DATA
  • 45. 

    INSPECT Statement is used for

    • A.

      Find a string

    • B.

      Replace a string

    • C.

      Count the characters in a string

    Correct Answer(s)
    A. Find a string
    B. Replace a string
    C. Count the characters in a string
  • 46. 

    Which operation is required before you do a READ on a KSDS file sequentially?

    • A.

      CLOSE

    • B.

      START

    • C.

      BEGIN

    • D.

      RETURN

    Correct Answer
    B. START
  • 47. 

    Which one is a control verb?

    • A.

      WRITE

    • B.

      READ

    • C.

      GO TO

    • D.

      READ ... AT END

    Correct Answer
    C. GO TO
  • 48. 

    In a SORT procedure the statement to write to the sort records are

    • A.

      RELEASE

    • B.

      READ

    • C.

      RETURN

    • D.

      START

    Correct Answer
    A. RELEASE
  • 49. 

    How to pass arguments when calling a COBOL procedure?

    • A.

      By content

    • B.

      By reference

    • C.

      By data

    • D.

      By value

    Correct Answer(s)
    A. By content
    B. By reference
  • 50. 

    Which Level will take ONLY elementary data item specification?

    • A.

      Level 01

    • B.

      Level 49

    • C.

      Level 77

    • D.

      Level 88

    Correct Answer(s)
    B. Level 49
    C. Level 77

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 27, 2015
    Quiz Edited by
    ProProfs Editorial Team
  • Jan 16, 2013
    Quiz Created by
    Arniragu
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.