COBOL Qb For Cbe13am1 Batch

20 Questions | Total Attempts: 536

SettingsSettingsSettings
Please wait...
COBOL Quizzes & Trivia

COBOL QB FOR CBE13AM1 BATCH


Questions and Answers
  • 1. 
    1). WORKING-STORAGE SECTION.                          01 WS-NUM1                     PIC 9(03) VALUE 100. 01 WS-NUM2                     PIC 9(02).         01 WS-NUM3                     PIC 9(02).         PROCEDURE      DIVISION.                               MOVE 200              TO WS-NUM2                           MOVE WS-NUM1  TO WS-NUM3                           MOVE WS-NUM2  TO WS-NUM3                           DISPLAY WS-NUM3            What is output stored in variable ws-num3?
    • A. 

      10

    • B. 

      20

    • C. 

      00

    • D. 

      30

  • 2. 
    3). WORKING-STORAGE SECTION.                          01 WS-NUM1                     PIC 9(03) VALUE 100.     PROCEDURE      DIVISION.                               MOVE 200     TO WS-NUM1     INITIALIZE WS-NUM1     DISPLAY WS-NUM1 .                   What is output stored in variable ws-num1
    • A. 

      A).000

    • B. 

      B).200

    • C. 

      C).100

    • D. 

      D).NONE

  • 3. 
    4).. WORKING-STORAGE SECTION.                          01 WS-NUM1                     PIC   S9(03) SIGN IS LEADING SEPARATE. HOW MANY BYTES  WS-NUM1 WILL OCCUPY?
    • A. 

      A).3

    • B. 

      B).4

    • C. 

      C).5

    • D. 

      D).2

  • 4. 
    2). WORKING-STORAGE SECTION.                          01 WS-NUM1                     PIC 9(03) VALUE 100. 01 WS-NUM2                     PIC 9(03).         01 WS-NUM3                     PIC 9(03).         PROCEDURE      DIVISION.                               MOVE 200     TO WS-NUM2                     STOP RUN            MOVE WS-NUM1 TO WS-NUM3                           MOVE WS-NUM2 TO WS-NUM3                           DISPLAY WS-NUM1.
    • A. 

      A). 10

    • B. 

      B).00

    • C. 

      C).20

    • D. 

      D).NOTHING WILL BE DISPLAYED IN SPOOL

  • 5. 
    5). WORKING-STORAGE SECTION. 01 WS-NUM1                            PIC  +9(3). PROCEDURE DIVISION. MOVE -120    TO WS-NUM1 DISPLAY WS-NUM1
    • A. 

      A).-120

    • B. 

      B).+120

    • C. 

      C).120

    • D. 

      D).NONE

  • 6. 
    6).OCCURS CAN BE DEFINED IN 01 LEVEL NO .TRUE OR FALSE?
    • A. 

      True

    • B. 

      False

  • 7. 
     INDEX  NAME SHOULD BE DEFINED IN WORKING-STORAGE SECTION?
    • A. 

      True

    • B. 

      False

  • 8. 
     ORGANIZATION FOR KSDS FILE?
    • A. 

      A).INDEXED

    • B. 

      B).RELATIVE

    • C. 

      C). SEQUENTIAL

    • D. 

      D).NONINDEXED

  • 9. 
    WORKING-STORAGE SECTION. 01 WS-PGM-NAME         PIC X(8) VALUE ‘PGMNAME’. PROCEDURE DIVISION. CALL WS-PGM-NAME .
    • A. 

      A).STATIC CALL

    • B. 

      B).DYNAMIC CALL

    • C. 

      C).NONE

    • D. 

      D).PGMNAME

  • 10. 
    WORKING-STORAGE SECTION. 01 WS-NUM1               PIC 9(2) VALUE  1. PROCEDURE DIVISON. MOVE 5 TO WS-NUM1 PERFORM 2100-PARA        THRU 2100-PARA-EXIT UNTIL WS-NUM1 < 4 HOW MANY TIMES 2100-PARA WILL BE EXECUTED
    • A. 

      A).5

    • B. 

      B).6

    • C. 

      C).0

    • D. 

      D).1

  • 11. 
    WORKING-STORAGE SECTION. 01 WS-NUM1               PIC S9(7)V9(4)  COMP-3. HOW MANY BYTES WS-NUM1 FIELD WILL OCCUPY?
    • A. 

      A).11

    • B. 

      B).6

    • C. 

      C).5

    • D. 

      D).8

  • 12. 
     Can I redefine an X(200) field with a field of X(100) ?
    • A. 

      A).YES

    • B. 

      B).NO

    • C. 

      C).NOT POSSIBLE

    • D. 

      D).NONE

  • 13. 
    WHAT IS LEVEL NO 88 USED FOR?
    • A. 

      A).RENAMES CLAUSE

    • B. 

      B).CONDITION NAMES

    • C. 

      C).ELEMENTARY ITEM

    • D. 

      D).GROUP ITEM

  • 14. 
    What is the result of the following?   VAR1 is defined as PIC 9(7).   MOVE ‘1234567’ to VAR1
    • A. 

      Compilation error

    • B. 

      S0C7 abend at runtime

    • C. 

      None of the above

    • D. 

      VAR1 CONTAIN 1234567

  • 15. 
    ). How many times PARA-1 is executed when SUB is with PIC 9.     PERFORM PARA-1 VARYING SUB FROM 1 BY 1 UNTIL SUB = 10.       PARA-1.          DISPLAY SUB.
    • A. 

      10 times

    • B. 

      9 times

    • C. 

      Keep looping (as SUB WILL BECOME 0 WHEN INCREASED TO 10)

    • D. 

      None of these

  • 16. 
    01 WS-NUM1     PIC 9(2).        01  WS-NUM2  PIC 9(2). PROCEDURE DIVISION. MOVE 10 TO WS-NUM1,WS-NUM2 IF WS-NUM1 = WS-NUM2    CONTINUE ELSE   DISPLAY ‘TWO NO ARE NOT EQUAL’ END-IF.    DISPLAY ‘TWO NO ARE EQUAL’ WHAT IS THE OUTPUT  OF THE ABOVE CODE?
    • A. 

      TWO NO ARE NOT EQUAL

    • B. 

      TWO NO ARE EQUAL

    • C. 

      NONE

    • D. 

      NOTHING WILL DISPLAYED

  • 17. 
    01 WS-GROUP.                                          05 WS-A                             PIC 9(03).     05 WS-B                             PIC 9(03).                                                    01 WS-GROUP1 REDEFINES WS-GROUP.                      05 WS-C                             PIC 9(03).     05 WS-D                             PIC 9(03). MOVE 100    TO  WS-C MOVE 200  TO WS-D MOVE 300 TO WS-A MOVE 400 TO WS-B DISPLAY WS-C
    • A. 

      A).400

    • B. 

      B).300

    • C. 

      C).200

    • D. 

      D).100

  • 18. 
    In WRITE statement it is required to mention the record name and not the file name
    • A. 

      True

    • B. 

      False

  • 19. 
    If A=10, B=20, C=30,D=0                Then the result of operation ______________                    ADD A B TO C GIVING D
    • A. 

      A).60

    • B. 

      B).50

    • C. 

      C).00

    • D. 

      D).10

  • 20. 
    ).01  WS-STR1                   PIC X(6).        01 WS-STR2                   PIC X(10).       01 WS-STR3                   PIC X(15). MOVE ‘SACHIN’   TO WS-STR1 MOVE’ TENDULKAR’  TO WS-STR2 STRING WS-STR1 DELIMITED BY SIZE,                WS-STR2 DELIMITED BY SPACE INTO WS-STR3 DISPLAY WS-STR3
    • A. 

      SACHINTENDULKAR b b-BLANK SPACE

    • B. 

      SACHIN TENDULKAR

    • C. 

      SACHINTENDULKAR

    • D. 

      NONE

Back to Top Back to top