Posted Under COBOL-Interview
1) The association between a filename and corresponding file medium is done in
(a) Date-compiled paragraph, identification division
(b) Object-computer paragraph, configuration section and environment division
(c) File-control paragraph, I-O Section and environment division
(d) I-O control paragraph, I-O Section and environment division.
2) The following is Data Division entry
05 FIRST-NAME PIC X (10).
05 MIDDLE-NAME PIC X (10).
04 SURNAME PIC X(20).
Which one of the following gives correct information about the above record description.
a) It is correct.
b) It is not correct because first-name and middle name contain the same PIC Clauses
c) Not correct because the PIC Clause is missing for the first three data items.
d) Not correct because the level number 03 is missing
3) Indicate which one of the following is correct
a) 01 level entry cannot have any picture clause.
b) 01 level entries may appear in any section of the Data Division.
c) 01 level entries may appear only in the File Section.
d) 01 level entries may appear only in the working-storage section and that too after all 77 level entries.
4) The following combination of edit characters can appear in the same PIC clause Except
5) Determine the size of the data item
6) Determine the size of the data item
7) Which one of the following is correct
8) The smallest negative dollar amount with a dollar in the output that can be edited Through the picture string -$$$$ is
9) To describe a record the level numbers may be chosen from
1. 01 to 77
2. 01 to 49 and 77
3. all odd numbers from 01 to 49
4. 01 to 49
10) In the following entries which is valid entry
1. 02 Amount pic “$ZZZZ9.99”
2. 02 UNDER-LINE PIC X(132) VALUE IS ALL *
3. 03 FILLER PIC X(40) VALUE “SPACES”
4. 03 A PIC X (6) VALUE 123456.
11) Indicate which one of the following is not a valid delimiters in Cobol
4. – (x)
12) Indicate which one of the following is an invalid paragraph name
13) The picture of RAFFLES IS
02 RAFFLES PIC 999V99
What will be the content of raffles when the following data is named to it?
14) Indicate which one of the following is correct
1. ADD A TO B GIVING C.
2. ADD A TO B, C TO D.
3. ADD A B TO C D GIVING E F.
4. ADD A B GIVING C D.
15) Indicate which one of the following is incorrect
1. SUBTRACT A FROM B GIVING D E F.
2. SUBTARCT A FROM D, B FROM E, C FROM F.
3. SUBTARCT A B C FROM D E GIVING F G.
4. SUBTRACT A B C FROM D E F.
16) Indicate which one of the following is correct
1. MULTIPLY A TIMES B.
2. MULTIPLY A INTO B.
3. MULTIPLY A BY B GIVING C.
4. MULTIPLY A BY B BY C.
17) Indicate which one of the following is incorrect
1. DIVIDE A INTO B.
2. DIVIDE A BY B.
3. DIVIDE A INTO B GIVING C.
4. DIVIDE A BY B GIVING C.
18) The Cobol compiler at the time of compilation indicates the error in the following Statement
MULTIPLY 0.1 BY A.
Which of the following had given the correct clause?
1. A has the PICTURE CLAUSE 9(4) V99.
2. A has the PIC CLAUSE ZZZ9.9
3. The Giving Option is missing
4. A is declared in the file section and not in the working storage section
19) In the statement
WRITE PRINT-LINE AFTER ADVANCING TWO LINES indicates that two is a
1. Data name
2. Numeric literal
3. Figurative constant
4. Mnemonic name
20) The following is a Procedure division statement
READ IN-FILE INTO IN-REC AT END CLOSE IN-FILE STOP RUN.
Where IN-REC is the record-name of IN-FILE. Which one of the following is
a. The AT END path is followed if any record becomes shorter than the record
b. The statement is correct since IN-REC is the record name of the IN-FILE
c. The statement is incorrect since AT END should be followed by GO TO statement
d. The AT END path is taken if all the records have been read and the current read encounters the end of file.
21) In DATA DIVISION the entries are
02 A PIC 99.
02 FILLER PIC X(7).
Indicate which one of the following statement in the Procedure division is correct
a. MOVE ‘AB’ TO A.
b. MOVE SPACES TO A.
c. MOVE ZEROS TO A.
d. MOVE SPACE TO FILLER.
Check all articles under COBOL-Interview