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

This question is related to TCS Interview

Showing Answers 1 - 4 of 4 Answers

ritesh kumar

  • Nov 28th, 2006
 

ans:-> b(1001)

  Was this answer useful?  Yes

mouli shareef

  • Jul 18th, 2007
 

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.

  Was this answer useful?  Yes

raja shankar dasgupta

  • Jul 24th, 2007
 

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

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions