If A>B
next sentence
end-if
display 1
display 2.
display 3.

If a>b, it will display only 3.(the next sentence,
ie., after fullstop/period)
____________________________________

if a>b
continue
end-if
display 1
display 2.
display 3.

If a>b, it Will display 1 2 3 (the next statement)
____________________________________

if a>b
continue
display 1
end-if
display 2
display 3.
display 4.

If a>b, Will it display 2 3 4 (or) 1 2 3 4 ?

Answers were Sorted based on User's Feedback



If A>B next sentence end-if display 1 display 2. display 3. If a>b, it will displ..

Answer / dharma

it will display 2 3 4 only

Is This Answer Correct ?    4 Yes 1 No

If A>B next sentence end-if display 1 display 2. display 3. If a>b, it will displ..

Answer / muttaiah

Really, Did someone execute this code before posting your
answers..

If a novice goes through this chat he will get confused
like which answer is correct

The asnwer is 2 3 4 why because whenever control encounters
continue it will start executing the stmt only after scope
terminator which is end-if in this case.

so 2 3 4 is the answer i have executed the code also.

Is This Answer Correct ?    3 Yes 0 No

If A>B next sentence end-if display 1 display 2. display 3. If a>b, it will displ..

Answer / sakthi kumar

Actually Continue is a do nothing statement, so it will
proceed as it is.

It will display 1 2 3 4

Is This Answer Correct ?    4 Yes 2 No

If A>B next sentence end-if display 1 display 2. display 3. If a>b, it will displ..

Answer / supriya tenany

Displaying '1', depends actually on the 'if' condition, since it is in the 'if' loop.

Is This Answer Correct ?    1 Yes 0 No

If A>B next sentence end-if display 1 display 2. display 3. If a>b, it will displ..

Answer / rajeumesh

Answer # 3 is correct

Is This Answer Correct ?    1 Yes 0 No

If A>B next sentence end-if display 1 display 2. display 3. If a>b, it will displ..

Answer / santy

for the first condition:-
If A>B
next sentence
end-if
display 1
display 2.
display 3.

If a>b, it will display only 3.(the next sentence,
ie., after fullstop/period)- is the Correct Answer.

for the second condition:-
if a>b
continue
end-if
display 1
display 2.
display 3.

If a>b, it Will display 1 2 3 (the next statement)
This is also correct answer, b'cos continue is doing
nothing other than passing control to next statement.

for the third condition:-

if a>b
continue
display 1
end-if
display 2
display 3.
display 4.

If a>b, Will it display 2 3 4 (or) 1 2 3 4 ?

Correct answer is the 1 2 3 4.

b'cos here continue will excuite next statement and after
the 'display3.' is excuitute then control pass to 'display
4.' sentence.

hopes now you r clear ur idea.

Is This Answer Correct ?    3 Yes 2 No

If A>B next sentence end-if display 1 display 2. display 3. If a>b, it will displ..

Answer / suputhru

Correct answer is the 1 2 3 4.

Is This Answer Correct ?    1 Yes 0 No

If A>B next sentence end-if display 1 display 2. display 3. If a>b, it will displ..

Answer / kamal

if a>b
continue
display 1
end-if
display 2
display 3.
display 4.
it will disply 1,2,3,4.

Is This Answer Correct ?    2 Yes 2 No

Post New Answer

More COBOL Interview Questions

How to define a array dynamically.....

5 Answers   Fidelity,


please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?

0 Answers   EDS,


How many times the loop runs here 01 a pic 9(2) value 1. perform para1 until a=10 move 1 to a. stop run. para1: move 10 to a.

5 Answers  


How to find How Many Lines in Sysin DD * Parameter Thru Cobol Coding? If any one knows the Answer Please Reply .....Thanks From Shree

3 Answers   Merrill Lynch,


TO abend the data sholud open in which mode? 1.new 2.old 3.mod 4.shr

1 Answers   MNC,






how many bytes do SPPPP999 will store?

18 Answers  


DATAONLY, MAPONLY functionality?

1 Answers   IBM,


What is "Call by content" and "call by reference"?

4 Answers   ADP, Syntel,


If there are two copybooks which have same variables and we are using both the copybooks in our program. will there be an error and if i move values to the variable which copybook varibales gets the values i move in.

3 Answers   CTS,


If a file has 1000 records.. if i have to replace the first and last characters of the file with another character. how it can be done....

1 Answers   HCL,


What is the difference between Call and a Link?

0 Answers  


WORKING-STORAGE SECTION. 01 VAR1 COMP-2 VALUE 0. PROCEDURE DIVISION. MOVE 10.2115 TO VAR1. DISPLAY 'VAR1 =' VAR1. GOBACK. 10.2115 is stored as .10211499999999996E 02 in OS VS Cobol 10.2115 is stored as .10211500000000000E 02 in ecobol. Any reason why?

3 Answers   TCS,


Categories