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


I HAVE FOLLOWING DECLARATION.
02. A PIC X(10) VALUE 'XXXXXXXXXX'.
02. B REDEFINES A.
05. C PIC X(3).
05. D PIC X(3).
05. E PIC 9(3).
IN MY PROG, I HAVE
MOVE 1 TO E.
DISPLAY A.
WHAT WILL BE DISPLAYED AS A RESULT OF THIS?
PLEASE EXPLAIN THE ANSWER. THANKS.

Answers were Sorted based on User's Feedback



I HAVE FOLLOWING DECLARATION. 02. A PIC X(10) VALUE 'XXXXXXXXXX'. 02. B REDEFINES A. ..

Answer / duboisa

no you have
A = 'XXXXXX001X'

Is This Answer Correct ?    13 Yes 1 No

I HAVE FOLLOWING DECLARATION. 02. A PIC X(10) VALUE 'XXXXXXXXXX'. 02. B REDEFINES A. ..

Answer / duboisa

for me you have
c = 'XXX'
d = 'XXX'
e = 001
and A = 'XXXXXX001'

Is This Answer Correct ?    7 Yes 3 No

I HAVE FOLLOWING DECLARATION. 02. A PIC X(10) VALUE 'XXXXXXXXXX'. 02. B REDEFINES A. ..

Answer / garry

Correct answer is : (As already explained and corrected by Duboisa )

C = xxx
D = xxx
e = 001
So A = xxxxxx001x

100% assured!!

Any difference can be routed or discussed at : thespider390@hotmail.com

Is This Answer Correct ?    4 Yes 0 No

I HAVE FOLLOWING DECLARATION. 02. A PIC X(10) VALUE 'XXXXXXXXXX'. 02. B REDEFINES A. ..

Answer / paray2x

1. you will get data exception as you cannot move 'XXX' to
a 9(3) field.

2. Since you have not initialised C,D it will be '......001'

Is This Answer Correct ?    7 Yes 5 No

I HAVE FOLLOWING DECLARATION. 02. A PIC X(10) VALUE 'XXXXXXXXXX'. 02. B REDEFINES A. ..

Answer / smiley

Can anybody explain...How C and D are having values as "XXX"
in answer ,though not initialized. Purpose of redefines
clause is to use the same storage space for different data.
I think answer posted by PRANAY2X is correct.

Is This Answer Correct ?    2 Yes 2 No

I HAVE FOLLOWING DECLARATION. 02. A PIC X(10) VALUE 'XXXXXXXXXX'. 02. B REDEFINES A. ..

Answer / prasad

Thanks a lot for the help friends....

Is This Answer Correct ?    0 Yes 2 No

I HAVE FOLLOWING DECLARATION. 02. A PIC X(10) VALUE 'XXXXXXXXXX'. 02. B REDEFINES A. ..

Answer / anil

we cannot declare the group item with level no 02 it should
be declared with 01. so the question itself wrong

Is This Answer Correct ?    1 Yes 8 No

Post New Answer

More COBOL Interview Questions

what is meant by binary search?

4 Answers  


What is the difference between goback, stop run and exit program in cobol?

0 Answers  


In an EVALUATE statement, can I give a complex condition on a when clause?

2 Answers  


The following entries appear in the WORKING-STORAGE SECTION: 01 DATE-TODAY. 05 YY PIC XX VALUE "90". 05 MM PIC XX VALUE "12". 05 DD PIC XX VALUE :31". 01 DATE-EDIT PIC XX/XX/XX. MOVE DATE-TODAY TO DATE-EDIT. (a) 901231 (b) 90/12/31 (c) 31/12/90 (d) 311290

4 Answers   TCS,


What are the functions like c or c++ in cobol?

2 Answers  


How to delete the records of a dataset through cobol programme?We should not use jcl utilitities like IDCAMS.

2 Answers  


how to know that the file has 300 records how to acess it?

0 Answers   Hewitt, TCS,


Write the code to count the sum of n natural numbers.

0 Answers  


What is the default value(s) for an initialize? What keyword will allow for an override of the default?

0 Answers  


How to remove 2 duplicate records and copy only one using job control language?

0 Answers  


What is the Purpose of POINTER Phrase in STRING command

3 Answers  


consider the following two statements MOVE 10 TO N PERFORM PARA-X N TIMES STOP RUN PARA-X MOVE 5 TO N how many times PARA-X willbe exicuted? a.10 b.5 c.infinate d.execution error

6 Answers   ABCL, TCS,


Categories