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 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




April 04, 2006 02:45:29 #2
 shashi pai   Member Since: Visitor    Total Comments: N/A 

RE: consider two data items 77 W-A PIC 9(3)V99 VA...
 
I dont think so. Correct answer out of 4 options should be invalid move. This code will fail in compilation itself as the value clause is not compatible with the type. If you still have doubts try it out.
     

 

Back To Question