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

This question is related to TCS Interview

Showing Answers 1 - 34 of 34 Answers

mahinder

  • Dec 12th, 2005
 

hai

The answer is D

  Was this answer useful?  Yes

Rishu

  • Jul 28th, 2014
 

Answer is 50. COMP can have decimal numbers as well. Check IBM manuals

  Was this answer useful?  Yes

mohit

  • Oct 9th, 2014
 

Answer is (a) because
already value will be there like 50.0 (99v9)
and again if we are moving the value to amount-1 it will become 50.0+50.0 = 100.
and comp field can contain decimal value.

  Was this answer useful?  Yes

Dinesh M

  • Mar 16th, 2015
 

Answer is C: Comp can hold decimal values and used in computation. The resultant value 100.0 is gets stored in 99v9 as 000.

  Was this answer useful?  Yes

Vengat

  • Mar 19th, 2015
 

Answer is b i.e. 50

  Was this answer useful?  Yes

Kirk

  • Aug 8th, 2015
 

A. 50

  Was this answer useful?  Yes

shashank

  • Aug 18th, 2015
 

d..because comp1 and com2 value contains only hexadecimal value hence it predicts unpredictable value

  Was this answer useful?  Yes

shashank

  • Aug 18th, 2015
 

a.50

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions