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


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

Define static linking and dynamic linking.

0 Answers  


1.What is the default print format in cobol?

5 Answers   HSBC,


We know that size of redefine and redefining need not to be same..Then does the below case true 01 ws-date pic 9(6). 01 ws-redf-date REDEFINES ws-date 05 ws-year pic 9(4) 05 ws-mon pic 9(2) 05 ws-day pic 9(2)

1 Answers   Cap Gemini,


how to transfer the file from pc to mainframe??

2 Answers  


What guidelines should be followed to write a structured cobol prgm?

0 Answers  


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

0 Answers  


How to read records in reverse order in flat file? I know we can do it by reading all records into an array.... Then read records in reverse order by using subscript or index but can any body give me the exact code.

5 Answers   TCS,


What is the significance of the PROGRAM-ID paragraph? If this name doesnt match with the name of the COBOL program, does it make a difference? Is the name specified in the PROGRAM-ID paragraph used as a name for the load module or any such thing?

4 Answers   IBM,


What is the difference between a DYNAMIC and STATIC call in COBOL?

2 Answers  


Consider the following code: 77 A PIC 99V99 VALUE 55.35 77 B PIC 99V999 VALUE 32.754 ADD B TO A ON SIZE ERROR DISPLAY "ERROR!!!" What will be the result ? (a) A=88.10, B=32.754 (b) A=87.00 B=32.754 (c) A=87.10 B=32.754 (d) ERROR!!! will be DISPLAYed on the screen.

3 Answers   TCS,


created cluster using IDCAMS ..that is empty ..when i write a program for read using Input ..wil it open the cluster or gives any error?

2 Answers   HCL,


where do we use dyanamic call ? and where do we use static call pls give any example pls ?

3 Answers   Patni,


Categories