GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Placement Papers  >  TCS  >  COBOL
Go To First  |  Previous Question  |  Next Question 
 COBOL  |  Question 39 of 44    Print  
Consider the following COBOL entries
05 X PIC 99 VALUE 10.
ADD 40 X TO X.
COMPUTE X = 3 * X - 40.
The result in X is
(a) 10
(b) 40
(c) Compile or Run time error
(d) none of these

  
Total Answers and Comments: 2 Last Update: September 22, 2007   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
May 25, 2007 10:23:30   #1  
kckinney Member Since: May 2007   Contribution: 48    

RE: Consider the following COBOL entries 05 X PIC...
The answer is that you are chained to your desk debugging the program until you realize that any defined variable must be capable of handling the largest possible value.You're just lucky you didn't decide to loop on that variable until it reaches 1000.

RTMkk

 
Is this answer useful? Yes | No
September 21, 2007 08:49:12   #2  
NAGARAJ        

RE: Consider the following COBOL entries 05 X PIC...
ans: (c) compile or run time error
05 level numbe is a group variable it cant be used as a elementary variable

 
Is this answer useful? Yes | No

 Related Questions

What is the result of the following? DIVIDE A INTO B GIVING C.a.C=A/B b.the reminder of B/A is stored in C c.C=B/A d.the reminder of A/B is stored in C

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

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

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

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

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

Given the following: 77 A PIC 9V9 VALUE 9.5 77 B PIC 9 VALUE 9. 77 C PIC V9 VALUE 0.8 77 D PIC 9 77 E PIC 9 77 F PIC 9V999 what are the contents of D E and F after the following statements are executed: COMPUTE F ROUNDED=A+C/B MULTIPLY A BY C GIVING E ADD B C A GIVING D ROUNDED a.F=9.589 E=8 D=1 b.F=9.589 E=8 D=9 c.F=9.589 E=7 D=9 d.F=9.589 E=7 D=1

Consider the following code: 77 A PIC 99V99 VALUE 55.35 77 B PIC 99V999 VALUE 32.754 ADD B TO A ON SIZE ERROR DISPLAY "ERROR!!!"What will be the result ? (a) A=88.10, B=32.754 (b) A=87.00 B=32.754 (c) A=87.10 B=32.754 (d) ERROR!!! will be DISPLAYed on the screen.

Consider the following:77 A PIC 9(10) 77 B PIC 9(10) 77 C PIC 9(19) MULTIPLY AB BY B GIVING CWhich of the following is true ?(a) The execution of the above may result in size error. (b) The execution of the above will result in size error. (c) The definition of C is invalid resulting in compilation error. (d) No error will be thee and the program would proceed correctly.


 Sponsored Links

 
Related Articles

How to develop compile and run a C program

The steps involved in building a C program are: 1. First program is created by using any text editor and the file is stored with extension as .c 2. Next the program is compiled. There are many compilers available like GNU C compiler called as gcc, Sun compiler, Borland compiler which is pop
 

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
 

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
 

COBOL Interview Questions

COBOL Interview Questions This article provides Mainframe Interview Questions covering Cobol questions For more Interview Questions Answers related to Mainframe click on links provided at the end of each question set mosgoogle COBOL 1 a What is the difference between write and move in COBOL b What i
 

Oracle Apps 11i : Asset Management - Journal Entries

Oracle Apps 11i Asset Management Journal Entries In this tutorial you will learn about Journal Entries Assets Journal Entries Flow Oracle Assets creates journal entries for depreciation expense asset cost other accounts and automatically creates general ledger transaction journal entries if you have
 

Better System Error Reporting using Websphere

System errors are unexpected and usually cause unrecoverable damage to a transaction Examples of system error are file system out of space out of memory exception and database connection timeout mosgoogle Click here for the article Category Weblogic
 

Compute Clusters and Grid Computing

Grid computing and compute clusters are two forms of computer clustering that could be differentiated based on the relationship of their nodes. The nodes in grid computing often have little to no relationship with each other as each node provide specific function for the completion of a specific pro
 

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