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




September 09, 2009 10:38:50 #6
 balasu   Member Since: September 2009    Total Comments: 2 

RE: 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
 
The answer is b. b23.75

w-A: 9(3)v99  = 23.75
w-B  zz9v99   = 123.45

output:

Z is replaced with Blank so output be, b.

FYI:
refer cobol ref book mk roy, page no 76.



     

 

Back To Question