HCU MCA 2015 Paper

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