GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Placement Papers  >  TCS  >  COBOL

 Print  |  
Question:  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




May 05, 2007 10:23:30 #1
 kckinney   Member Since: May 2007    Total Comments: 32 

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
     

 

Back To Question