GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Placement Papers  >  TCS  >  COBOL
Go To First  |  Previous Question  |  Next Question 
 COBOL  |  Question 20 of 44    Print  
consider the following two statements
MOVE 10 TO N
PERFORM PARA-X N TIMES
STOP RUN
PARA-X
MOVE 5 TO N
how many times PARA-X willbe exicuted?
a.10
b.5
c.infinate
d.execution error

  
Total Answers and Comments: 2 Last Update: June 25, 2007   
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: thequestsailor
 
answer is c infinite
since in the first instance the value of N is 10 and it will give the control to the PARA-X which will again set the value of N to 5 this will keep on continuing as there is no counter or an increment or decrement of the said value of N.

Above answer was rated as good by the following members:
Mainframer18, grupul doi
September 28, 2005 05:37:55   #1  
Praveen Kumar Member Since: September 2005   Contribution: 6    

RE: consider the following two statements MOVE 1...

Ans is 10.

As the PERFORM N TIMES clause will be evlauated at the start only that how many times the requested para is to be executed.


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
June 25, 2007 04:54:12   #2  
thequestsailor Member Since: January 2007   Contribution: 6    

RE: consider the following two statements MOVE 1...
answer is c infinite
since in the first instance the value of N is 10 and it will give the control to the PARA-X which will again set the value of N to 5 this will keep on continuing as there is no counter or an increment or decrement of the said value of N.

 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 1Overall Rating: -N/A-    

 Related Questions

Consider two data items 77 W-A PIC 9(3)V99 VALUE 23.75 77 W-B PIC ZZ9V99 VALUE 123.45 after the statement MOVE W-A TO W-B what will be W-B value? a.123.75 b.b23.75 (where b indicates space) c.023.75 d.invalid move

What if any, is the syntax error in the following piece of code 01 B PIC A(7) 02 C PIC 9(4) IF(B NUMERIC) ADD 10 TO C a.the condition in the if statement is wrong b.noting is wrong c.because C is initialised.ADD 10 TO C is wrong d.both B and C shoud have same size.

Study the following 01 A PIC 99V0 VALUE 5 01 B PIC 9V9 VALUE 6 01 C PIC 99V9 VALUE 2.5 01 D PIC 99 VALUE 3 COMPUTE A ROUNDED B C = A+B*C/D ON SIZE ERROR PERFORM PRINT-ERROR the comments of A.B.C after execution of the above statement are a.A=10 B=0 C=10 b.A=10 B=9.9 C=9.9 c.A=10 B=0 C=9.9 d.A=10 B=6 C=10

How many times PARA-A is performed : PERFORM PARA-A VARYING TIMES-COUNTER FROM 1 BY 1 UNTIL TIMES-COUNTER >0 PARA-A MOVE P TO Q MOVE H TO TIMES COUNTER a.10 b.1 c.11 d.0

Consider the following piece of code 01 GROUP-ITEM 05 AMOUNT-1 PIC 99V9 USAGE COMP VALUE 50 05 AMOUNT-2 PIC 9(4)V99 USAGE COMP MOVE ZERO TO GROUP-ITEM ADD 50 TO AMOUNT-1 what will be the content of AMOUNT-1? a.50 b.100 c.0 d.unpredictable

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

C1 C2 C3 are three conditions whose TRUTH values are as folloes. 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

Consider the following FD FILE-1 01 REC-1 PIC X(80) ...... WORKING-STORAGE SECTION 01 W-REC PIC X(90) ........ PROCEDURE DIVISION FIRST-PARA ....... READ FILE-1 INTO W-REC AT END MOVE 1 TO EOF-FLAG which of the following is true with respect to the above? a.REC-1 will contain nothing and W-REC will contain the contains of the record read b.REC-1 and W-REC contain the same data c.syntex is invalid and error will occur d.REC-1 and W-REC must be of same size

PERFORM ACCUMULATE-TOTALS VARYING A FROM 1 BY 2 UNTIL A >2 AFTER B FROM1 BY 1 UNTIL B>2 AFTER C FROM 2 BY -1 UNTIL C<2 the paragraph ACCUMULATE-TOTALS would be exicuted a.18 times b.4 times c.8 times d.24 times

Consider the following two IF statements: IF X AND NOT Y MOVE A TO B IF Z=1 OR 9 MOVE A TO B select one of the following data division entries which gives identical results for both the above IF statements a.01 Z PIC 9 88 X VALUE 1.9 88 Y VALUE 0.2 THRU 8 b.01 Z PIC 9 88 X VALUE 0.2 THRU 8 Y VALUE 1.9 c.01 Z PIC 9 88 X VALUE 1.9 88 NOT-Y VALUE 0.2 THRU 1.9 d.none of the above


 Sponsored Links

 
Related Articles

Microsoft AJAX Library - JavaScript Execution Context

JavaScript Execution Context In this section we ll take a peek under the hood of the JavaScript closures and the mechanisms that allow us to create classes objects and object members in JavaScript For most cases understanding these mechanisms isn t absolutely necessary for writing JavaScript code&am
 

C++ Decision Making Statements

C Decision Making Statements In this C tutorial you will learn about decision making statements if statement if&hellip; else statement switch statement conditional operator along with syntax and examples mosgoogle center Decision making is an important concept in any programming language and to
 

exit and return statements

&nbsp; How does the exit () and return () differ exit () is used to exit the program as a whole. In other words it returns control to the operating system. After exit () all memory and temporary storage areas are all flushed out and control goes out of program. In contrast, the return () stateme
 

JavaScript Conditional Statements Part 2

JavaScript Conditional Statements Part 2 In continuation of JavaScript Conditional Statements Part 1 this tutorial will help you learn about remaining conditional statements in JavaScript if else if else statement and switch statement mosgoogle if else if else statement If there are many branching o
 

JavaScript Conditional Statements Part 1

JavaScript Conditional Statements Part 1 In this JavaScript tutorial you will learn about the conditional statements available in JavaScript for decision making if statement and if else statement mosgoogle Just like any other programming language conditional statements in JavaScript are used for de
 

Quality Aspects to Check While Writing COBOL Program

Quality Aspects to Check While Writing COBOL Program This article gives a general list which the programmer must check while delivering programs developed in COBOL This can also be used as a general checklist for checking quality of the COBOL program developed mosgoogle Quality is a vital factor fo
 

PHP Tutorials - Conditional Statements

PHP Tutorials Conditional Statements In this PHP Tutorials you will learn about Conditional Statements if statement if else statement Alternative if else statement&nbsp; and&nbsp; switch statement mosgoogle if statement if syntax is as follows if an expression that return Boolean value
 

The Use of Trial and Error To Solve Problems

The Use of Trial and Error To Solve Problems Some complex problems can be solved by a technique that is called trial and error Trial and error is typically good for problems where you have multiple chances to get the correct solution However this is not a good technique for problems that don t give
 

How To Perform Class Loading With Java

How To Perform Class Loading With Java The class loading system for Java is both flexible and strong It will allow your programs to gains access to class databases without having to link to include&quot; files which are static It will load archive files which contain these classes and other to
 

WebSphere V5.0 : Creating SQL statements

WebSphere V5 0 Creating SQL statements In this tutorial you will learn about WebSphere V5 0 Creating SQL statements SQL query builder Use Query builder to generate queries mosgoogle Use query builder to generate queries Creating SQL statements You can create an SQL statement using either the SQL que
 

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