COBOL Multiple choice Questions & Answers

Posted On:December 8, 2018, Posted By: Latest Interview Questions, Views: 240, Rating :

COBOL Objective type Questions and Answers for Freshers & Answers pdf

Dear readers, these COBOL Multiple choice Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your Job interview for the subject of COBOL. As per my experience good interviewers hardly plan to ask any particular question during your Job interview, normally questions start with some basic concept of the subject and later they continue based on further discussion and what you answers:

1. Event-driven languages are:

(a) FORTRAN based

(b) Are used  to write procedural languages

(c) OOP

(d) Designed to make programming GUI easier

Answer: D

COBOL Questions and Answers

2. IDE is:

(a) Independent Development Enterprise

(b) A development environment for machine language

(c) A software project management tool 

(d) An Integrated Development Environment for Visual Basic

Answer: D

3. Which of the following is not part of the IDE:

(a) Code editor window

(b) Properties window

(c) Form layout window 

(d) General window

Answer: D

4. The application name always appears in the:

(a) Properties window 

(b) Intermediate window 

(c) Code window 

(d) Title bar 

Answer: D

5. The color of a button is:

(a) One of its properties

(b) Not updateable 

(c) Defined in the project 

(d) Defined in the Intermediate window 

Answer: A

6. Code is:

(a) Updateable in the form editor 

(b) Instructions 

(c) Seldom used 

(d) An object 

Answer: B

7. Controls are:

(a) Code 

(b) Part of the menus 

(c) Rules 

(d) Objects 

Answer: D

8. In the IDE, which of following is used to design the layout of an application?

(a) Form Designer window

(b) Project Explorer window

(c) Context Menu

(d) Form Layout window

Answer: A

9. The location of the form on the desktop during execution is determined by the:

(a) Form Designer window

(b) Project Explorer window

(c) Context Menu

(d) Form Layout window

Answer: D

10. The Object Browser:

(a) Displays the command buttons and textboxes, etc. 

(b) Shows frequently used shortcuts as objects 

(c) Is a Context Menu

(d) Displays the object libraries and their combinations of data and code 

Answer: D

11. The location of the form on the desktop during execution is determined by the:

(a) Form Designer window

(b) Project Explorer window

(c) Context Menu

(d) Form Layout window

Answer: D

12. The first procedure-oriented language was:

(a) FORTRAN 

(b) BASIC

(c) COBOL

(d) ADA

Answer: A

13. C is:

(a) A language widely used in UNIX

(b) A language based on BASIC

(c) Used primarily for business applications 

(d) A GUI 

Answer: A

14. COBOL is:

(a) One of the oldest programming languages

(b) Still widely used 

(c) Not suitable for business applications

(d) None of the above 

Answer: D

15. Object Oriented languages:

(a) Are procedural languages 

(b) Are task oriented 

(c) Are based on actions happening to objects 

(d) Are natural language techniques 

Answer: C

16. Visual Basic projects are identified by a:

(a) “.vbp” suffix

(b) “.mak” suffix

(c) “.vbg” suffix

(d) All the above

Answer: D

17. Visual Basic forms are identified by a:

(a) “.frm” suffix

(b) “.mak” suffix

(c) “.for” suffix

(d) A special icon

Answer: A

18. To run an application in Visual Basic:

(a) Click on the start button (blue arrow)

(b) Use the File Menu 

(c) Use the Project Menu to select Run 

(d) None of the above

Answer: A

19. To exit Visual Basic:

(a) Click Alt-Q

(b) Use the File Menu to select Quit 

(c) Use the Window Menu to select Exit

(d) Click on the diskette icon

Answer: A

20. The reference library of Visual Basic books is called:

(a) MSDN Library 

(b) Help Library 

(c) Contents 

(d) Topic pane

Answer: A

21) Name the divisions which is not in COBOL program.

  A. IDENTIFICATION 

  B. ENVIRONMENT

  C. FILE

  D. DATA

  E. WORKING 

Answer: E 

22) What level is used for RENAMES clause?

  A. 66 

  B. 77 

  C. 88

  D. 90

  E. 01

 Answer: B

23) How do you define a table/array in COBOL using INDEX?

A. 01 ARRAYS. 05 ARRAY2 PIC X(6) OCCURS 20 TIMES INDEXED BY WS-INDEX

  B. 01 ARRAY2 PIC X(6) OCCURS 20 TIMES INDEXED BY WS-INDEX 

  C. 01 ARRAYS. 05 ARRAY1 PIC X(9) OCCURS INDEX BY 10 TIMES

  D. 01 ARRAYS. 88 ARRAY2 PIC X(6) OCCURS 20 TIMES INDEXED BY WS-INDEX

  E. None of the Above

Answer: B 

24) Which mode of opening is required when REWRITE is used?

  A. UPDATE 

  B. OPEN

  C. I-O 

  D. INPUT

  E. REWRITE

Answer: C 

25) Which clause can be used instead of checking for FILE STATUS = 10?

  A. RECORD NOT FOUND 

  B. AT END 

  C. DUPLICATE RECORD

  D. END OF FILE

  E. AT SPACES

Answer: B 

26) What are the access mode requirements of START statement?

  A. SEQUENTIAL 

  B. DYNAMIC 

  C. RELATIVE

  D. INDEX

  E. ALL OF THE ABOVE

Answer: B  

27) What is comp-3 usage ?

  A. packed decimal 

  B. binary usage

  C. Hex

  D. Single precision floating point

  E. None

Answer: A 

28) In which section do sort description  is given?

  A. WORKING-STORAGE 

  B. FILE SECTION 

  C. CONTROL SECTION

  D. LINKAGE SECTION

  E. NONE

Answer: B 

29) Which level is used for condition clause?

  A. 77 

  B. 01

  C. 05

  D. 88 

  E. Any level can be used

Answer: D 

30) Which statement is used to end the COBOL program? 

  A. STOP 

  B. END

  C. STOP RUN 

  D. END RUN

  E. None of the Above

 Answer: C

31) Which one of the following modes of operating the Sequential file is not true

(a) OPEN INPUT 

(b) OPEN INPUT-OUTPUT

(c) OPEN EXTEND

(d) OPEN OUTPUT

Answer: a

32) The same file name can be specified in the USING and GIVING phrase of a SORT statement.

(a)True 

(b)False

Answer: a

33) If USING is specified in the SORT verb, then GIVING must also be specified.

(a)True

(b)False 

Answer: b

34) In SORT statement, all keys must be specified as ascending or descending but not as combination of the two

(a)True

(b)False 

Answer: b

35) SORT RAFFLES_FILE

ON ASCENDING KEY IBM-MAIN Y2K-MAIN

USING INPUT-FILE GIVING OUTPUT-FILE.

Which one the following is true.

(a)The sorted file will contain all Raffles records in ascending order of Y2K-MAIN.

(b)IBM-MAIN is the major key and Y2K-MAIN is the minor key 

(c)The statement is wrong as there should be only one key since the clause ascending key appears only once.

(d)Both INPUT-FILE and OUTPUT-FILE must be described in the DATA DIVISION with SD entries.

Answer: b

36) SORT STUDENT-FILE

ON ASCENDING KEY CLASS-NUMBER STUDENT-NAME

USING INPUT-FILE GIVING OUTPUT-FILE.

Which one of the following is false.

(a)All records with same CLASS-NUMBER will appear together in the consecutive positions of the sorted file.

(b)The data-names CLASS-NUMBER and STUDENT-NAME must appear in the record description of STUDENT-FILE.

(c)The files INPUT-FILE and OUTPUT-FILE should be opened by an OPEN statement before the SORT statement. 

(d)The sizes of the records described for STUDENT-FILE , INPUT-FILE and OUTPUT-FILE must be equal.

Answer: c

37) About the MERGE verb,which one of the following is true. 

(a)Can merge a maximum of three files.

(b)Does not require that the input file to be merged be sorted on the merge keys.

(c)Requires that all files mentioned in the statement must have records of same size 

(d)Does not require that the position of the merge keys with in the records descriptions of each of the files must be same.

Answer: c

38) Indicate which one the following is not a valid combination of a SORT verb

(a)USING …….. GIVING

(b)USING …….. INPUT PROCEDURE

(c)USING …….. OUTPUT PROCEDURE 

(d)INPUT PROCEDURE ….. OUTPUT PROCEDURE

Answer: c

39) Indicate which one of the following will not have the INVALID KEY Phrase when used in connection with sequentially accessed relative file in a PROCEDURE DIVISION with out any declarative section.

(a)REWRITE STATEMENT 

(b)WRITE STATEMENT

(c)START STATEMENT

Answer: a

40) WRITE MASTER-REC INVALID KEY GO TO PARA-ERROR.

Indicate which of the following are not valid modes of opening the INDEXED file of which MASTER-REC is a record

(a) OPEN INPUT (b) OPEN OUTPUT (c) OPEN INPUT-OUTPUT (d) OPEN INDEXED.

(a)a and b

(b)a and c

(c)c and d

(d)a and d 

Answer: d

41) which of the following is true about the file which is referenced in a DELETE statement

(a)It must be opened in INPUT mode

(b)It must be opened in OUTPUT mode

(c)It must be opened in I-O mode 

(d)As in the case of SORT statement, the file must be closed before the use of this statement

Answer: c

42) Indicate which of the following is not a PROCEDURE DIVISION verb

(a)REWRITE

(b)INSERT 

(c)DELETE

(d)START

Answer: b

43) In case of a disk file, the ACCESS MODE clause must always be specified.

(a)True

(b)False 

Answer: b

44) A READ statement can have AT END clause and INVALID KEY clause, but both must not appear simultaneously.

(a)True 

(b)False

Answer: a

45 With a READ statement either AT END clause or INVALID KEY clause must be specified

(a)Yes

(b)No 

Answer: b

46) Relative key clause must be mentioned in case of a Relative file organisation.

(a)Yes

(b)No 

Answer: b

47) The START statement enables the programmers to start processing from any record position.

(a)True 

(b)False

Answer: a

48) Both the RECORD KEY and ALTERNATIVE KEY clause can be specified for and INDEXED file.

(a)True 

(b)False

Answer: a

49) 77 A PIC X(10) VALUE IS “AABBCCDDEE”.In PROCEDURE DIVISION contains the statement EXAMINE A REPLACING ALL “ABC” BY “XYZ” .Indicate which one of the following is true

(a)The EXAMINE statement is incorrect because A does not contain the character “ABC” in a continuous sequence

(b)The EXAMINE statement is incorrect as it can be used to replace a numeric literal by another numeric literal.

(c)The EXAMINE statement is incorrect as it is used to replace a single character by another single character but not a group of characters. 

(d)The EXAMINE statement is incorrect as TALLYING OPTION is missing.

Answer: c

50) The UNSTRING verb is used to transfer data from several sources to one receiving field.

(a)Yes

(b)No 

Answer: b

 


Cobol Interview Questions & Answers
COBOL Multiple choice Questions & Answers