Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Answer Posted / priyanka

IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO.

DATA DIVISION.
WORKING-STORAGE SECTION.
01 GROUP-ITEM.
05 AMOUNT-1 PIC 99V9 COMP USAGE COMP VALUE 50.
05 AMOUNT-2 PIC 9(4)V99 USAGE COMP.

PROCEDURE DIVISION.
A000-FIRST-PARA.
INITIALIZE GROUP-ITEM.
MOVE 0 TO GROUP-ITEM.
ADD 50 TO AMOUNT-1.

DISPLAY AMOUNT-1
.
STOP RUN.

If we don't use " MOVE 0 TO GROUP-ITEM." condition then the answer is 50 else if we are using it then the answer is 32.0. so I think the right answer is unpredictable.
Please correct in email if I am wrong.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

i have 10 names in an array and my name is one of them also array is not in sorted order i need to display my name using index how will i do this

1541


) what is the difference between AID and HANDLE AID?

2160


IF I mention stop run in CICS what happens?

2382


write a cobol logic. i have file that has 10 records .1 record go to first output file and second record goes to 2 output and etc

1243


What is the difference between Global and External Variables?

1385


1.give the details about WHEN OTHER. 2. how many form are available in evaluate.

2115


How do we get current date from system with century in COBOL?

1385


What kind of error is trapped by on size error option?

1250


What is the Purpose of Pointer in the string?

1084


what happens if parmparameter passes zero bytes to the program

2141


Difference between cobol and cobol-ii?

1285


How to get the last record in vsam file in cluster? And how can you get the ksds file records into cobol program?

1177


Write a program that uses move corresponding.

1154


How can you get the ksds file records into your cobol program?

1100


Write a cobol program making use of the redefine clause.

1189