COBOL Interview Questions -4



COBOL Interview Questions -4

Postby Ravi Teja » Wed Dec 08, 2010 3:58 pm

If i am incorrect,please correct me



(1) What are different file OPEN modes available in COBOL?

a) Open for READ, OUTPUT, I-O, EXTEND.
b) Open for INPUT, OUTPUT, I-O, EXTEND.
c) Open for READ, WRITE, I-O, EXTEND.
d) Open for INPUT, OUTPUT, I-O, APPEND


(2) Hierarchy of the execute of logical operators is

a) NOT AND OR
b) AND OR NOT
c) OR NOT AND
d) OR AND NOT


(3) What is File status 02 ?

a) Record Key duplicate
b) End of file
c) Alternate Key Duplicate
d) File open Error


(4) Which of the following is not a procedure division verb?

a) Start
b) Seek
c) Rerun
d) Delete


(5) How many bytes will comp-2 occupy?

a) 8 bytes
b) 4 bytes
c) 16 bytes
d) 24 bytes


(6) What is the result of the following? DIVIDE A INTO B GIVING C

a) C=A/B
b) remainder of B/A is stored in C
c) C=B/A
d) The remainder of A/B is stored in C


(7) ON SIZE ERROR can be used along with sz0

a) All arithmetic verbs
b) Only ADD, COMPUTE and MULTIPLY verbs
c) only COMPUTE verb
d) Only ADD verb


(8) What do you mean by file status 39

a) File opened in wrong mode
b) File attribute mismatch
c) File logically error
d) File opened in write mode


(9) Indicate which one of the following is incorrect

a) SUBTRACT A B C FROM D E F
b) SUBTRACT A B C FROM D E GIVING F G.
c) SUBTRACT A FROM D, B FROM E, C FROM F.
d) SUBTRACT A FROM B GIVING D E F.


(10) How is sign stored in Zoned Decimal fields?

a) Sign is stored as a hex value in the last nibble (4 bits ) of the storage
b) Sign is over punched with numeric value stored in the last bite
c) Sign is stored in hex value in first 4 bits of storage
d) None of the above



(11) C1 C2 C3 are three conditions whose TRUTH values are as follows. C1-TRUE C2-FALSE C3-TRUE A,B,C are defined as given below
A:C1 AND(NOT C2) OR C3
B.(NOT C1) OR (NOT C2 AND NOT C3)
C.(C1 OR C2)AND C3
D.C1 AND C2 OR C3

given the above information which of the following statements are valid?


a) only A,B and C are TRUE
b) only A,C and D are TRUE
c) A,B,C and D are TRUE
d) only C and D are TRUE


(12) PERFORM RTN-1 VARYING I FROM 1 by 2 UNTIL I > 2 AFTER J FROM 1 BY 1 UNTIL J > 2 AFTER K FROM 2 BY -1 UNTIL K < 1 . HOW MANY TIMES RTN-1 WILL BE EXECUTED ?

a) 4 times
b) 5 times
c) 6 times
d) 8 times


(13) What is the linkage section?

a) It is must for called program
b) It is must for calling program
c) used for displaying messages in sub program
d) Temporary storage for called program


(14) What is the compiler option to get 24 digit number?

a) ARITH(EXTEND)
b) TEST
c) RENT
d) ARITH(COMPAT)


If i am incorrect,please correct me
Thank You
Ravi Teja
 
Posts: 15
Joined: Fri Dec 03, 2010 11:22 am
Has thanked: 0 time
Been thanked: 0 time

Re: COBOL TEST-4 WITH ANSWERS

Postby Robert Sample » Wed Dec 08, 2010 5:59 pm

3. From the COBOL Language Reference manual on 02 file status key:
This file status value applies only to indexed files with alternate keys
that allow duplicates.
Care to change your answer?

8. Your answer is wrong.

9. Don't know -- didn't test it.

12. Don't know -- didn't test it.

13. None of the answers are correct. LINKAGE SECTION is addressing in a called program that points to the data values passed from the calling program -- the storage comes from the calling program. It's not really temporary, it's not required unless data is being passed between the programs, it is NOT used by the calling program, and it could be used to display messages in the called program but that's not the main use.
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: COBOL TEST-4 WITH ANSWERS

Postby Ravi Teja » Thu Dec 09, 2010 12:44 pm

Thank robert
Thank You
Ravi Teja
 
Posts: 15
Joined: Fri Dec 03, 2010 11:22 am
Has thanked: 0 time
Been thanked: 0 time


Return to Interview Questions

 


  • Related topics
    Replies
    Views
    Last post