01 xxx pic 9(4).
01 yyy pic 9(6).

move 123456 into yyy.
move yyy to xxx.

display yyy.

what would be the value of yyy

Answers were Sorted based on User's Feedback



01 xxx pic 9(4). 01 yyy pic 9(6). move 123456 into yyy. move yyy to xxx. display yyy. wha..

Answer / jaganmohanreddy

HAI ALL U R WRITING DIFFERENT ANSWERS BUT THEY ARE ASKING
FOR YYY VALUE IT WONT BE CHANGED IT HAS VALUE OF 123456
BECAUSE ITS PIC CLAUSE IS 9(6) OK THEN DISPLAY YYY IT WIL
DISPLAY 123456 OK ANY DOUBTS

Is This Answer Correct ?    55 Yes 3 No

01 xxx pic 9(4). 01 yyy pic 9(6). move 123456 into yyy. move yyy to xxx. display yyy. wha..

Answer / jaganmohanreddy

answer is 123456

Is This Answer Correct ?    38 Yes 4 No

01 xxx pic 9(4). 01 yyy pic 9(6). move 123456 into yyy. move yyy to xxx. display yyy. wha..

Answer / v@m$i

YYY VALUE NOT CHANGE.
ie 123456

Is This Answer Correct ?    29 Yes 1 No

01 xxx pic 9(4). 01 yyy pic 9(6). move 123456 into yyy. move yyy to xxx. display yyy. wha..

Answer / siba

In numeric number alingment is right to left
truncation is done in left side
the datatype size of y is 6
so value of y is 123456

Is This Answer Correct ?    14 Yes 2 No

01 xxx pic 9(4). 01 yyy pic 9(6). move 123456 into yyy. move yyy to xxx. display yyy. wha..

Answer / adithya

YYY : 123456

XXX : 3456

Is This Answer Correct ?    12 Yes 0 No

01 xxx pic 9(4). 01 yyy pic 9(6). move 123456 into yyy. move yyy to xxx. display yyy. wha..

Answer / gangadhara.m

numeric number alingment is right to left
truncation is done in left side
the datatype size of y is 6
so value of y is 123456

Is This Answer Correct ?    8 Yes 2 No

01 xxx pic 9(4). 01 yyy pic 9(6). move 123456 into yyy. move yyy to xxx. display yyy. wha..

Answer / mahaveer

Here if u display YYY it will 123456
and if u display xxx it will 3456

Hope its clear

Is This Answer Correct ?    4 Yes 0 No

01 xxx pic 9(4). 01 yyy pic 9(6). move 123456 into yyy. move yyy to xxx. display yyy. wha..

Answer / vishal

12345

Is This Answer Correct ?    8 Yes 9 No

01 xxx pic 9(4). 01 yyy pic 9(6). move 123456 into yyy. move yyy to xxx. display yyy. wha..

Answer / vjay

we cannot move yyy to xxx ....see the data length

Is This Answer Correct ?    2 Yes 3 No

01 xxx pic 9(4). 01 yyy pic 9(6). move 123456 into yyy. move yyy to xxx. display yyy. wha..

Answer / v@m$i

OUTPUT:
----------
3456

Is This Answer Correct ?    9 Yes 15 No

Post New Answer

More COBOL Interview Questions

What is Redefines clause?

8 Answers  


what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.

1 Answers   Syntel,


Can printer files (having 133 characters) be of variable length?

3 Answers  


What is the figurative constant in cobol?

1 Answers  


a pic s9(4) comp b pic s9(4) comp-3 c ???????????????? d ???????????????? move a to c add a+B giving d. what is ur declaration for c,d?

4 Answers  






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

0 Answers  


can you please let me know if there is any walkins for COBOL/PLI/DB2/IMS/JCL in pune other than IBM and ITC infotech

0 Answers  


We are using the searching a table which is indexed, once the key is found, how can we get the occurance at which the key was found.

1 Answers  


The maximum number of dimensions that an array can have in COBOL-85 is ?

11 Answers  


I know my query will return more than one row but I don't want cursor what should I do?

1 Answers  


What rules are to be followed while using the corresponding options?

0 Answers  


What do you feel makes a good program?

2 Answers  


Categories