GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Placement Papers  >  TCS  >  COBOL
Go To First  |  Previous Question  |  Next Question 
 COBOL  |  Question 11 of 44    Print  
consider the following progrm statements
MOVE 0 TO SW.NO.OF.REC
PERFORM PRI-OUT UNTIL SW=1
DISPALY NO.OF.REC
STOP RUN
PRE-OUT
READ IN-FILE AT END
MOVE 1 TO SW
WRITE OUO-REC FROM IN-REC
ADD 1 TO NO.OF REC
if the IN-FILE contains 1000 records what value will be displayedafter the PERFORM is over?assume that N0.OF.REC has PIC 9(4)
a.1000
b.1001
c.1
d.none of the above since there is a syntex error

  
Total Answers and Comments: 4 Last Update: August 30, 2009   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
November 28, 2006 00:05:04   #1  
ritesh kumar        

RE: consider the following progrm statements MOVE...
ans:-> b(1001)
 
Is this answer useful? Yes | No
July 18, 2007 07:59:59   #2  
mouli shareef        

RE: consider the following progrm statements MOVE...
Ans: d

The datanames or variables must be declared only by using 0 to 9 and A to Z and -

Syntax error is there in the dataname declared.

 
Is this answer useful? Yes | No
July 24, 2007 07:33:31   #3  
raja shankar dasgupta        

RE: consider the following progrm statements MOVE...

The answer is d
if we ignore the spelling mistakes
now perform pri-out until sw 1; while reading the in-file its automatically adding one to the subscript.
so the new value of sw 1 and then the loop stops.

i think the prob is with the logic


 
Is this answer useful? Yes | NoAnswer is useful 0   Answer is not useful 1Overall Rating: -1    
August 28, 2009 16:39:49   #4  
ram_prabhakar Member Since: August 2009   Contribution: 1    

RE: consider the following progrm statements MOVE 0 TO SW.NO.OF.REC PERFORM PRI-OUT UNTIL SW=1 DISPALY NO.OF.REC STOP RUN PRE-OUT READ IN-FILE AT END MOVE 1 TO SW WRITE OUO-REC FROM IN-REC ADD 1 TO NO.OF REC if the IN-FILE contains 1000 records
Answer should be D. Syntax error because only hifens are allowed to name a field in COBOL.
 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape