COBOL INTERVIEW QUESTIONS-4
- C1, C2 and C3 are condition-names. Consider the following compound conditions:
A. C1 OR C2 OR C3
B. C1 AND C2 AND C3
C. C1 OR (C2 AND C3)
D. C1 AND (C2 OR C3)
if C1 is known to evaluate to 'False' which of the above four conditions can be evaluated without additional information?
A) NONE (C2 and C3 should also be evaluated in every case)
B) ALL (All conditions evaluate to 'False')
C) A AND C evaluate to 'True'
D) B AND D evaluate to 'False'
- The function of the imperative statement RELEASE in COBOL is to
A) Obtain the output record from a SORT
B) Free the least recently used PROCEDURE division segment
C) Move an input record to a SORT
D) Free an assigned peripheral
- Which of the following is correct about level number 15
A) Must always have a PIC clause
B) May describe a group item or an elementary item
C) Must always appear in the file section
D) Must always describe an elementary item
- Which of the following is not correct about the format of data division entries
A) Entries with level number 01 must start in columns 8 to 11.
B) Entries with level number 77 can start in column 8 or any column to its right but not beyond 72.
C) Entries with level numbers 02 to 49 can start in column 8 or any column to its right but not beyond column 72
D) Data name or filler in any data division entry, cannot begin before column 12 and a gap of one space should be there between the level number and the data name or filler.
- Which one of the following is not a valid delimiter in COBOL
- Which one of the following is correct.?
A) ADD A B GIVING C D
B) ADD A TO B GIVING C
C) ADD A TO B, C TO D
D) ADD A B TO C D GIVING E F
- Which one of the following is correct?
A) MULTIPLY A TIMES B
B) MULTIPLY A BY B BY C
C) MULTIPLY A INTO B
D) MULTIPLY A BY B GIVING C
- Find which one of the following does not give the correct description of the usage clause.
A) It is used in a data description and restricts the procedure division statements in which the data item can be used
B) It is used in a data description affects the memory requirements
C) It specifies the internal form of the data item in such a way that it facilitates the use of data item more efficiently
D) All the above
- Which one of the following is true about corresponding phrase?
A) It enables one to save memory space
B) It helps to reduce coding effort
C) It can be used only with the move verb
D) It helps to create more efficient object code
- Which one of the following is false?
A) If there is no parenthesis in a compute, then a division is always done before a subtraction.
B) All the four arithmetic operators namely, +, -, * and / can be used in the same compute statement, if required
C) The data name which is on the left-hand side of the equal sign in a compute statement should be described in the data division as a numeric data item.
D) Both rounded and size error phrases can appear in the same compute statement
- Which of the following is true about 88 level entry?
A) It is used for individual data items in working-storage section
B) It is used for items with renames clause
C) It is used for a condition name
D) It is used for a data item which redefines another data item
- Which one of the following is FALSE about the SEARCH verb?
A) Any number of WHEN clauses can be used with this verb
B) The SEARCH verb can only be applied to a table which is defined with the occurs clauses and indexed phrase
C) Every search statement must contain the AT END clause
D) The SEARCH verb passes control to the next sentence when either a when condition is satisfied or the end of the table is reached without satisfying any of the when conditions
- Which of the following is false?.
A) It is possible to write programs without using GO TO
B) The target of a go to statement being a procedure name, avoiding go to results in a program with no procedure names.
C) Indiscriminate use of GO TO is not advisable as it can make the control structure of a program substantially complex
D) Excessive use GO TO statement can make programs difficult for others to understand
- Which of the following cannot help us to get the reduce memory requirement of a program in COBOL?
A) Reserve clause
B) Redefines clause
C) Same record area clause
D) Rerun clause
- Which of the following is true about the RESERVE clause?
A) This is a part of file descriptor entry for a given file
B) This is used only for file with block contains clause
C) This is used whenever more than one file is processed in a program
D) This can be used to save memory space by specifying one buffer instead of the usual two buffers
The RESERVE clause allows the programmer to specify the number of record buffers to be allocated at run-time for the files.
Example RESERVE 2 AREAS
mean that two record buffers are to be allocated.
- Which of the following is True about MERGE verb?
A) Requires that all files mentioned in the statement must have records of same size
B) It can merge only a maximum of three files
C) It does not require that the input files to be merged be sorted on the merge keys
D) It does not require that the positions of the merge keys within the record descriptions of each of the files must be same
- Which one of the following is incorrect?
A) The case structure can be implemented through go to with depending on phrase as well as simple go to
B) The case structure can be implemented through nested if sentence
C) The case structure can be implemented through a sequence of if statements
D) The case structure can be implemented through go to with depending on phrase but without any simple go to
- Which of the following is preferred clause for creating an indexed sequential file?
A) Access mode is random
B) Access mode is sequential
C) Access mode is dynamic
D) None of the above
- Which of the following is true about a file where write statement will always place a record in the next physical position
A) Relative file
B) Indexed sequential file
C) None of the above
D) Sequential file
- Which is true about the file which is referenced in a delete statement
A) It must be opened in I-O mode
B) It must be opened in input mode
C) It must be opened in output mode
D) As in the case of a sort statement, the file must be closed before the use of this statement