Test Index

HCU MCA 2015 Paper

Show Para  Hide Para 
Note: Answer questions 71 and 72 based on the following algorithm.
START
 \\text{ \textbackslash} STR := ’ ’ ,\text{STR := ' ' ,} \ \text{ }ASTR := ‘a’,
 \\text{ \textbackslash} BSTR : = ’b’ WHILE LENGTH (\text{BSTR : = 'b' WHILE LENGTH (} \ \text{ }STR) < 100
INPUT OPTION AS 1 OR 2
READ OPTION INTO  \\text{ \textbackslash} OPT IF (\text{OPT IF (} \ \text{ }OPT = 1) THEN
APPEND  \\text{ \textbackslash} ASTR IN THE BEGINNING OF \text{ASTR IN THE BEGINNING OF } \ \text{ }STR
APPEND  \\text{ \textbackslash} BSTR IN THE END OF \text{BSTR IN THE END OF } \ \text{ }STR
END IF
IF ( \\text{ \textbackslash} OPT = 2) THEN APPEND COPY OF \text{OPT = 2) THEN APPEND COPY OF } \ \text{ }STR AT THE END OF  \\text{ \textbackslash} STR ENDWHILE OUTPUT \text{STR ENDWHILE OUTPUT } \ \text{ }STR
END
© examsnet.com
Question : 71 of 75
Marks: +1, -0
Go to Question: