0% found this document useful (0 votes)
25 views22 pages

10 Flowchart and Pseudocode - 12feb2022

Uploaded by

thejaka aloka
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views22 pages

10 Flowchart and Pseudocode - 12feb2022

Uploaded by

thejaka aloka
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

10 Flowchart and pseudocode

12 February 2022
Past paper questions
1. If N is an integer variable, the following code: OL2008MCQ26
N=10
DO while N>=5
N=N-1
LOOP
1)Executes 6 times 2)executes 5 times 3)never begins 4)never ends

2. Logical structure of the flowchart given in the figure shows OL2008MCQ30

1)a sequence 2)a simple selection 3)both sequence and simple selection
4)an iteration

3. A student writes the following three statements regarding high-level


languages in a class assignment and submits it to the teacher. OL2008MCQ40
(A) A high-level language is a computer language that is easily understood
by human
(B) It needs no translation to machine language
(C) An example of a high-level language is Java
The teacher cuts that part” is easily understood by human” in (A) and writes
“resembles human languages”. He/She deletes (B) completely and leaves (C)
unchanged.
Which one of the following statements describes an invalid reason for the
teacher’s action?
(1) The teacher deletes the part mentioned above in (A) because it is
incorrect
(2) The teacher writes “resembles human languages” because it is more
suitable
(3) The teacher deletes (B) completely because it is incorrect
(4) The teacher ignores (C) because it is correct

4. If the value of variable P is initially 2, what will be the value of the


variable P after execution of the loop GIT2008MCQ30
for count :=1 to 4 do p:=p*count;
1)1 2)10 3)24 4)48

5. Within a program, a group of statement are to be executed repeatedly 10


times. Select the most suitable statement for this purpose from the
following type of statement in Pascal programming GIT2008MCQ32
1)For-statement 2)while-statement 3)repeat - statement 4)if - statement

Regunathan Umapathy BSc https://ictmcq.home.blog Page 1 of 22


6. The given flowchart models the reading of a set of temperatures (T) and
displaying a message "Cold" when they are below 26°C. What is the correct
sequence of the labels that should be denoted by the circles 1, 2, 3, 4, 5,
6 of the flowchart? OL2009MCQ27

1) Read T, T<26, No, "Cold", Yes, Anymore?


2) Read T, T<=25, Yes, "Cold", No, Anymore?
3) Read T, Anymore?, Yes, "Cold", No, T<=25
4) Read T, Anymore?, No, T<26, Yes, "Cold"

7. What will be the value of output by Display Z of the given pseudo-code?


OL2009MCQ28
Begin
X=1
Y=1
while(X=Y)
Z=X+Y
Y=2
end while
display Z
end
1)1 2) 2 3)3 4)4

8. If N is an Integer Variable, the following program code: OL2009MCQ29


N=10
M=6
DO While M > 5
N = N –1
Loop
1)executes 6 time 2)executes 5 times 3)never begins 4)never ends

9. What is the order of precedence of operators used to evaluate the expression


2*(3+4)(-5/2+6 in computer programming OL2009MCQ30

10.

In computer programming, which one of the following relationships is


correct, regarding the contents in columns X and Y of the table given above:
2009MCQ31
1)(A) with (Q) and (S) 2) (A) with (S) and (B) with (R )
3)(B) with (P) and (R ) 4)(B) with (Q) and (S)

Regunathan Umapathy BSc https://ictmcq.home.blog Page 2 of 22


11. Value of the variable X is initially 20, what will be the value of X after
the execution of the loop repeats X := X-4 unit X < 0; GIT2009MCQ30
1)0 2)-4 3)4 4)8

12. Select the operator that has the highest priority in the list of operators
{<>, +, <, OR, MOD} GIT2009MCQ33
1) <> 2)+ 3)OR 4)MOD

13. Answer below 3 question based on the given flowchart

What are the outputs of the flowchart, if the current temperature is 28°C,
27°C, 26°C respectively? OL2010MCQ23
1)Cold, Cold, Cold 2)Hot, Cold, Cold 3)Hot, Hot, Cold 3)Hot, Hot, Cold
4)Hot, Hot, Hot

14. Which of the following control structures are required to convert the
following flowchart into a computer program? OL2010MCQ24
A - If Then construct B - If Then Else construct C - For Loop D - Do-
While loop
1)A only 2)B only 3)For Loop 4)Do-While Loop

15. Which of the following data types is suitable for the variable C and R in
the above flowchart?OL2009MCQ25
1)String 2)Real 3)Boolean 4)Currency

16. Which of the following statement is incorrect regrading a variable used in a


computer program? OL2009MCQ26
1)A variable has a name (identifier) 2)A variable refers to one or more
memory locations
3)A variable has a data type 4)The value of a variable remains
unchanged

17. Which of the following represents the correct order of precedence of


arithmetic operators from left to right?OL2010MCQ27
1)+, *, = 2)+, *, - 3)*, +, / 4)*, /, +

18. Consider the following pseudocode:OL2010MCQ28

which of the following is a possible output of the above pseudo code?


1) 4, 12, 3 2)5, 2, 10 3)5, 10, 2 4)4, 8, 2

Regunathan Umapathy BSc https://ictmcq.home.blog Page 3 of 22


19. Consider the below flowchart for 4 questions.

Which of the following represents process, decision and output respectively?


GIT2010MCQ32
1)X=X-3, Is X>15, Print X 2)X=21, X=X-3, Print X
3)Is X>15, X=X-3, Print X 4)X=X-3, X=21, Print X

20. Choose the most correct decision that terminates the iteration. GIT2010MCQ33
1)X>15 2)X<15 3)X>=15 4)X<=15

21. What is the output of the flow chart? GIT2010MCQ34


1)9 2)12 3)15 4)18

22. If the decision X > 15 is changed to X >= 15, the output of the flowchart is
GIT2010MCQ35
1)9 2)12 3)15 4)18

23. Consider the given flowchart to answer the below 2 questions.

Consider the following is correct regarding the flowchart? OL2011MCQ22


1)It repeats more than three times.
2)It stops when 3 is entered for num.
3)It displays the total when the counter is 3.
4)It gets 4 numbers from a user.

24. Which of the following can be used to replace "Add num to total" in the
flowchart?OL2011MCQ23
1) num = num+total 2) total = num*total 3) total = total+num 4) total =
total/num

25. Which of the following statements is correct regarding control structures


used in algorithms? OL2011MCQ24
1)Statement/Statements with in If-then construct is executed when the
condition is false.
2)For-Next loop can be used when the number of repetitions is known in
advance.
3)If-Then construct cannot be used within For-Next loop.
4)If Then construct cannot be nested.

Regunathan Umapathy BSc https://ictmcq.home.blog Page 4 of 22


26. Consider the following flowchart and answer below 4 questions.

What types of control structures are included in the given flowchart?


GIT2011MCQ33
1)Repetition, Sequence 2)Sequence, Selection 3)Repetition, Selection
4)Repetition, Selection, Sequence

27. Choose the most correct condition that executes the process Tax =0.01*pay in
the flow chart.GIT2011MCQ34
A – Status < 1
B – Status > 1
C – Status = 1
1)A only 2)B only 3)Either A or B 4)B and C only

28. What is the output of the flow chart? GIT2011MCQ35


1)100 2)500 3)1000 4)5000

29. If the initilisation value Status = 1 is changed to Status = 2 the output of


the flow chart is: GIT2011MCQ36
1)5 2)50 3)500 4)5000

30. Consider the given flow chart: AL2011MCQ21

Which of the following statements about the algorithm represented by the


flow chart is incorrect?
1)It stops when the user enters the value -1
2)It stops when the user enters the value 5
3)It gives the message "You are very close" when the user enters the value 9
4)It gives the message "You are very close" when the user enters the value 6
5)If the user entered by the user is 8, it allows the user to enter another
value.

Regunathan Umapathy BSc https://ictmcq.home.blog Page 5 of 22


31. What is the expected output of the following pseudo-code, segment?
OL2012MCQ31

1)1234 2)2345 3)12345 4)23456

32. Consider the following flow chart for the below 3 questions

What are the control structures that represent the decision "Is X <=10? And
"Is X an even number" respectively?GIT2012MCQ32
1)Sequence, Iteration 2)Iteration, Selection 3)Iteration, Sequence
4)Selection, Iteration

33. Consider the most correct decision that terminates the iteration.
GIT2012MCQ33
1)X>10 2)X<10 3)X <= 10 4)X >= 10

34. What is the output of the flow chart?GIT2012MCQ34


1)384 2)640 3)945 4)3840

35. If the process X = X + 1 is changed to X = X + 2, how many times will the


process M = M * X be executed?GIT2012MCQ35
1)0 2)5 3)10 4)11

Regunathan Umapathy BSc https://ictmcq.home.blog Page 6 of 22


36. Consider the following flowchart to answer the below two questions.
AL2012MCQ43

What flow control structures is/are used in the flow chart?


1)Sequence Only
2)Sequence and selection only
3)Sequence and Iteration only
4)Selection and Iteration only
5)Sequence, Selection and Iteration only

37. Which of the following statements about the algorithm represented by this
flow chart is correct if the user inputs the value 6?AL2012MCQ44
1)It stops when the value of i is equal to 6.
2)It prints the value 4 as one of its outputs.
3)It prints the value 2 as one of its outputs.
4) It prints all the integers from 1 to 6.
5)It prints all the integers from 1 to 5.

38. Sarah has been asked to write a computer program to compute the average
rainfall in an year. Consider the following included in the computation.
OL2013MCQ25
A - number of days in the year.
B - calculating the total rainfall for the year by adding together rainfall
for each day of the year.
C - calculating average rainfall by dividing the total rainfall from number
of days in the year.
D - the average rainfall for the year.
E - rainfall for each day of the year.
Which of the following is true regarding input, processes and output of the
above computation?
1)Inputs: A, B processes: C, D output: E
2)Inputs: A, E processes B, C output: D
3)Inputs: A, D processes:B, C output:E
4)Inputs: B, E processess:A, C output:D

39. What is the result after evaluation of the expression 1+3*5-2, considering
the operator precedence of programming languages?OL2013MCQ28
1)10 2)12 3)14 4)18

Regunathan Umapathy BSc https://ictmcq.home.blog Page 7 of 22


40. The following illustrates how the fare for a 3-wheeler taxi ride is
calculated for a certain distance.
Use this flowchart to answer below 4 questions.

Which of the following control structure have been used in the above
flowchart? GIT2013MCQ34
1)repetition, selection and sequence 2)repetition and sequence
3)repetition and selection 4)selection and sequence

41. What is the value of x, when the above taxi_fare calculations process
terminates?GIT2013MCQ35
1)x = 4 2) x = 5 3)x = 6 4)x = 7

42. What is the final value of taxi_fare?GIT2013MCQ36


1)120 2)155 3)190 4)225

43. What is the output of the flowchart, if the condition "is x = 1" is changed
to "is x = 2"?GIT2012MCQ37
1)120 2)155 3)190 4)225

44. Consider the following statements: 2014OLMCQ21


The step by step process for solving a problem is known as Ⓐ
A pseudo code does not depend on Ⓑ of programming language.
Graphical representation of the sequence of operators in a program is called

The correct terms to fill the blanks Ⓐ, Ⓑ and Ⓒ in the above three
statements respectively.
1)an algorithm, a flowchart, the syntax 2)the syntax, an algorithm, a
flowchart
3)an algorithm, the syntax, a flowchart 4)a flowchart, an algorithm, the
syntax

45. The following pseudo code is used to select candidates based on Age, Height
and Weight to call for an interview for a certain job. OL2014MCQ22
If (Age >= 21 AND Age<=40) AND (Height>=155 OR Weight >=55)
Then output 'Qualified for Interview'
Else output 'Not qualified for Interview'
Two candidates Sumith and Raju have the following values for Age, Height and
Weight.
Name Age Height (cm) Weight (kg)

Sumith 26 157 52

Raju 33 154 54
Who will be qualified for the interview?
1)Sumith only 2)Raju only 3)Both Sumith and Raju 4)None of them

Regunathan Umapathy BSc https://ictmcq.home.blog Page 8 of 22


Below 3 questions are based on the following pseudo code algorithm segment
which calculates the sum of odd numbers between 0 and 10.
sum = 0
num = 1
while num < 10
sum = sum + num;
num = num + 2;
end while

46. How many times will the while-loop be executed? OL2014MCQ25


1)5 2)6 3)10 4)11

47. What is the value of num after the execution of this pseudo code?
OL2014MCQ26
1) 3 2)7 3)10 4)11

48. Which of the following is required to replace the statement in line 2 of the
above pseudo code to calculate the sum of even numbers in the same range?
OL2014MCQ27
1)num=-1 2)num=2 3)sum=1 4)sum=2

49. Consider the following two control structures, A and B:OL2014MCQ28


A - Do until <condition> B - Do
Statement Statement
Loop Loop until <condition>
Which of the following is true regarding the control structures A and B
above?
1)Both Statement 1 and Statement 2 are executed at least once.
2)Statement 1 is executed at least once but Statement 2 is executed
depending on the condition.
3)Statement 2 is executed at least once but Statement 1 is executed
depending on the condition.
4)Both Statement 1 and Statement 2 are executed for a fixed number of
cycles.

50. Which of the following pseudocode segments is equivalent to the logic of


the given flow chart segment? OL2015MCQ35

51. Marks for 10 subjects of a student are stored in the array 'marks' with the
index ranging from 1 to 10. A pseudocode to calculate the average marks with
three labels Ⓟ, Ⓠ and Ⓡ is given below. OL2015MCQ36
total_marks = Ⓟ
for i=1 to 10
begin
total_marks = total_marks+marks[Ⓠ]
end
average_marks = total_marks/Ⓡ
1) 0, 10, i 2) 0, i, 10 3)10, i, 10 4)10,10, I

Regunathan Umapathy BSc https://ictmcq.home.blog Page 9 of 22


52. How many times will the following 'while' loop exeunt? OL2015MCQ37
count = 9
while count >= 3
count = count - 2
end while
1)2 2)4 3)6 4)8

53. Consider the following pseudocode segment: OL2015MCQ38


OddTotal = 0
count = 0
CurrentOdd = 1
while count <= 3
OddTotal = OddTotal + CurrentOdd
CurrentOdd = CurrentOdd + 2
count = count + 1
end while
print oddTotal
What is the output of the following pseudocode segment?
1)9 2)16 3)25 4)36

54. Consider the following pseudocode segment: OL2015MCQ39


if average_marks > 50 then
if failed_subjects = 0 then
scholarship = 'True'
endif
Endif
Which of the following is equilavent to the logic in the above pseudocode?
1)If average_marks > 50 AND failed_subjects = 0 Then scholarship = 'True'
2) If average_marks > 50 OR failed_subjects = 0 Then scholarship = 'True'
3) If average_marks > 50 then failed_subjects = 0 Else scholarship = 'True'
4) If average_marks > 50 then scholarship='True' Else failed_subjects = 0

55. Consider the 'while' loop and the 'repeat until' loops given below:
OL2015MCQ40
count_A = 1 count_B = 1
while count_A <= 10 repeat
count_A = count_A + 2 count_B = count_B + 2
end while until count_B <= 10
What are the values of count_A and count_B after completion of the execution
of while and repeat until loops respectively?
1) 9 and 9 2)9 and 11 3)11 and 9 4)11 and 11

56. The labelled flowchart shows the steps to be followed for crossing the road
safely. The relevant activities involved are listed. GIT2015MCQ33.

Ⓟ - Cross the road carefully,


Ⓠ - Stop near the Zebra crossing.
Ⓡ - Look right, left and right again.
Ⓢ - Is the road clear on both ways.
Which of the following gives the correct matching?
1)A:Ⓠ, B:Ⓟ, C:Ⓡ, D:Ⓢ 2)A:Ⓠ, B:Ⓡ, C:Ⓢ, D:Ⓟ
3)A:Ⓡ, B:Ⓢ, C:Ⓠ, D:Ⓟ 4)A:Ⓢ, B:Ⓡ, C:Ⓠ, D:Ⓟ

Regunathan Umapathy BSc https://ictmcq.home.blog Page 10 of 22


57. The labelled flowchart below shows the user login process in an online email
system. The relevant activities involved are listed as

Ⓟ, Ⓠ, Ⓡ and Ⓢ. GIT2015MCQ34
Ⓟ - Display the error message.
Ⓠ - Are the user name and pasword valid.
Ⓡ - Enter the name and password
Ⓢ - Permit user into the system.
Which of the following gives the correct matching?
1)A:Ⓟ, B:Ⓠ, C:Ⓡ, D:Ⓢ 2)A:Ⓠ, B:Ⓡ, C:Ⓟ, D:Ⓢ 3)A:Ⓡ, B:Ⓠ, C:Ⓟ, D:Ⓢ
4)A:Ⓢ, B:Ⓠ, C:Ⓡ, D:Ⓟ

58. Which of the following represents the logic in the given flowchart
segment?GIT2015MCQ35

59. Consider the pseudocode with the label Ⓧ to calculate the sum of numbers
from 1 to 100. OL2016MCQ37
sum = 100
num = 0
repeat
num = num + 1
sum = sum + num
until Ⓧ
For the above mentioned pseudocode, what is the correct condition that
matches with the label Ⓧ?
1) num < 100 2) num<=100 3)num>100 4)num >=100

Below 2 questions are based on the following flowchart designed to find the
smallest number from any ten numbers.

Regunathan Umapathy BSc https://ictmcq.home.blog Page 11 of 22


60. Which of the following correctly represents the label Ⓟ and Ⓠ in the
flowchart respectively? OL2016MCQ38
1)Output Min, Min=N 2)Output N, count=count-1
3)Output count, Min=N 4)Output Min, count=count-1

61. Which of the following statements is correct related to the control


structures given in the flow chart?OL2016MCQ39
1)SELECTION occurs within REPETITION
2)REPETITION occurs within SELECTION
3)REPETITION occurs within REPETITION
4)SELECTION occurs within SELECTION

62. Consider the following pseudocode segment: OL2016MCQ40


count = 0
repeat
display("HELLO" )
count = count+1
until count> 4
while count>4
display("HELLO")
count=count-1
end while
How many times will the word HELLO displayed when the above pseudocode is
executed?
1)4 2)5 3)6 4)7

63. Which of the following represents the logic of the given flowchart?
GIT2016MCQ33

1)Do A 2)Do A
If B then While Not(B)
Do C Do D
Else Endwhile
Do D Do C
EndIf

3)Do A 4)Do A
While B If Not(B) Then
Do D Do C
Endwhile Endif
Do C Do D

Regunathan Umapathy BSc https://ictmcq.home.blog Page 12 of 22


64. What are the values of X, Y and Z when the following statements are executed
in the correct order? GIT2016MCQ34
X = 7
Y = 14
Z = 0
Z = Y - X
Y = X
1) X = 0, Y =7, Z = 0 2)X = 7, Y = 14, Z = 7 3)X = 7, Y = 7, Z = 7 4)X =
7, Y = 7, Z = 0

65. Consider the following program GIT2016MCQ37


Count = 0;
Num = 0;
While Count < 4;
Num = Num + Count;
Count = Count + 1;
End While
Output Count;
Output Num;
What are the values of 'Num' and 'Count' when the execution of the above
program segment is completed? GIT2016MQ37
1) Num = 3, Count = 4 2)Num = 4, Count = 3 3)Num = 6, Count = 3
4)Num = 6, Count = 4

66. How many times the while loop in the given program segment is executed?
GIT2016MCQ38
1) 2 2)3 3)4 4)5

67. Consider the algorithm in the following flowchart: OL2017MCQ24

What values will be displayed for X and Y respectively, if the inputs are X
=10 and Y =20 for the given flowchart?
(l) 10. 10 (2) 10,20 (3) 20, 10 (4) 20, 20

68. Consider the following pseudocode with label Ⓟ to find the product of
numbers from 1 to 10. OL2017MCQ25
product = 1
number = 0
repeat
number=number+1
product = product * number
until Ⓟ
Which of the following expressions is correct for label Ⓟ?
(l) number>1O (2) number<1O (3) number>=1O (4) number<=10

69. Which of the following pseudocode segments is equivalent to the logic of the
algorithm given in the
flowchart?OL2017MCQ26

Regunathan Umapathy BSc https://ictmcq.home.blog Page 13 of 22


70. Consider the following pseudocode: OL2017MCQ27
X=0
do
display ' *'
X=X+2
while X < 5
As the output of the above pseudocode, how many times the ' * 'will be
displayed?
(1) 2 (2) 4 (3)5 (4) 6

71. Consider the following pseudocode:OL2017MCQ28


if average>7O then
if Sport_colour = 'True' then
Allrounder _award =' True'
end if
end if

which of the following is equivalent to the logic of the above pseudocode?


(1) if average>70 AND Sport_colour = 'True' then Allrounder_award = 'True'
(2) if average>70 OR Sport_colour = 'True' then Allrounder_award = 'True'
(3) if average>70 then Allrounder_award = 'True'
(4) if Sport_colour = 'True' then Allrounder_award = 'True'

72. The area and the circumference of a circle is calculated using πr² and 2πr
respectively where r is the radius of the circle and π is a constant(π =
22/7). The labelled flowchart shown repeatedly reads the radius of the
circle and calculates and displays its area and circumference. The labels Ⓟ
, Ⓠ , Ⓡ and Ⓢ need to be identified appropriately from A, B, C and D
given below.GIT2017MCQ37

Regunathan Umapathy BSc https://ictmcq.home.blog Page 14 of 22


A - Display Area, Circumference
B - Is there any more input?
C - Area = (22/7)*Radius*Radius
Circumference = 2 * 22/7 *Radius
D - Input Radius
Which of the following gives the correct matching?
1)Ⓟ = A, Ⓠ = D, Ⓡ = C, Ⓢ = B
2)Ⓟ = B, Ⓠ = A, Ⓡ = C, Ⓢ = D
3)Ⓟ = D, Ⓠ = C, Ⓡ = A, Ⓢ = B
4)Ⓟ = D, Ⓠ = B, Ⓡ = C, Ⓢ = A

73. Below three questions are based on the following flowchart which calculates
the number of students who are present and absent in a class of a school.
GIT2017MCQ38

Which of the following can be observed in the above flowchart?


1)Iteration inside iteration 2)Iteration inside Selection
3)Selection inside Iteration 4)Selection only

74. What is the value of Student_Count after completion of counting


present/absent status of all students?GIT2017MCQ39
1)33 2)34 3)35 4)36

75. Which of the following is the most suitable control structure to implement
the iteration in this flowchart?GIT2017MCQ40
1)Do-While 2)If-Then 3)If-Then-Else 4)While-Do

Regunathan Umapathy BSc https://ictmcq.home.blog Page 15 of 22


76. Consider the following pseudocode segment:OL2018MCQ35
Payment_option ='False'
If distance>100 THEN
Payment_option='TRUE'
If vehicle_type='Bus' THEN
Payment_option='False'
ENDIF
ENDIF
Which of the following statements is correct according to the above
pseudocode?
(1) If distance = 99 and vehicle-type = 'Car' then Payment_option will be
made 'True'.
(2) If distance = 99 and vehicle-type = 'Bus' then Payment_option will be
made 'True'.
(3) If distance = 101 and vehicle-type = 'Bus' then Payment-option will be
made 'False'.
(4) If distance = 101 and vehicle-type = 'Car' then Payment_option will be
made 'False'.

77. Marks obtained by 10 students for the ICT paper is given in the following
array A, which has indexing stating at 0.

Which of the following indexed items can be used to retrieve the highest
mark?OL2018MCQ36
1) A[0] 2)A[1] 3)A[7] 4)A[9]

78. How many times will the $ mark be displayed after the execution of the
following pseudocode? (Only one answer has been altered from the exam paper)
OL2018MCQ37
BEGIN
P=0
REPEAT
Q = P MOD 2
IF Q = 1 THEN
DISPLAY '$'
ENDIF
P = P + 1
UNITL P < 5
END
1)0 2)1 3)2 4)3

79. Consider the flowchart on the right which inputs a number and displays the
message 'Valid Mark' if the input number is between 0 and 100. OL2018MCQ38

What should be the correct terms for label Ⓟ, Ⓠ andⓇ


1)N<=100, No, Yes
2)N<=100, Yes, No
3)N=100, No, Yes
4)N=100, Yes, No

Regunathan Umapathy BSc https://ictmcq.home.blog Page 16 of 22


80. Which of the pseudocodes is equivalent to the logic of the given flowchart?
OL2018MCQ39

81. Which of the following is/are correct regarding programming


languages?OL2018MCQ40
A - Machine language uses binary digits (bits) based instructions which
computer can understand.
B - Assembly is a low level machine dependent programming language which
uses a symbolic representation of machine code.
C - High level programming languages are machine independent
1) A only 2)A and C only 3)B and C only 4) All A, B and C

82. Which of the following statements are true? OL2019MCQ35


A - Pascal is an example of a high-level programming language.
B - High-level language programs are easier for the programmers to
understand than low-level language programs.
C - A compiler translates a high-level language into machine language
instructions
1)A and B only 2)A and C only 3)B and C only 4)All A, B and C

83. Consider the following pseudo-code segment:OL2019MCQ36


BEGIN
READ units
IF units <= 50 THEN
amount: units • 1
ELSE
IF units>50 AND units<= 150 THEN
amount = 50 + (units — 50)*2
ELSE amount = 250 + (units - 150)*5
ENDIF
ENDIF
DISPLAY amount
END
What would be the output if the value of 175 is input for the variable
units?
1) 175 2)250 3)300 4)375

84. What would be the output if a user inputs the numbers 4, 5, 2, -1 one after
the other for the following pseudo-code segment. OL2019MCQ37
terminal = -1
x = 0
REPEAT
DISPLAY "Enter number"
GET num
If num>x THEN
x = num
ENDIF
UNTIL num = terminal
DISPLAY x
1)-1 2)0 3)4 4)5

Regunathan Umapathy BSc https://ictmcq.home.blog Page 17 of 22


85. Consider the following statements regarding computer programs OL2019MCQ38
A - Variables can contain different values at different times.
B - Reserved words of a programming language can be used as variable names
in that language
Which of the following is true with respect to the above?
1)Only A is correct 2)Only B is correct
3)Both A and B are correct 4)Both A and B are incorrect

86. Consider the following pseudo-code OL2019MCQ39


READ a, b, c
value = 0
If (a>b) THEN
IF (a>c) THEN
value = a
ELSE
value = c
ENDIF
ENDIF
DISPLAY value
If the values for the variables a, b and c are 50, 30 and 70 respectively,
what would be the displayed output?
1)0 2)30 3)50 4)70

87. What would be the output of the following Pseudo code? OL2020MCQ37
BEGIN
sum = 0
count = 5
REPEAT
sum = sum+ count*count
UNTIL count > 0
DISPLAY sum
END
1)25 2)41 3)50 4)55

88. What would be the output of the given flowchart,


if 5 is given as the input for num? OL2020MCQ39

1)120 2)60 3)24 4)5

89. What would be the output of the following Pseudo-code? OL2020MCQ40


BEGIN
number = 12
WHILE number > 5
IF (number>=10)
number=number/2
ELSE
number = number+4
ENDWHILE
DISPLAY number
END
1)5 2)6 3)10 4)16

Regunathan Umapathy BSc https://ictmcq.home.blog Page 18 of 22


90. The pseudocode given below reads two numbers and displays the larger
number.OL2016Part2

Draw a flow chart to represent the above pseudocode.


ii)Suppose a school has conducted an examination of a particular subject for
100 students and recorded the marks scored. The given flowchart with blank
spaces indicated by the labels Ⓐ to Ⓓ is designed to read these marks and
display the highest.
Identify and write down the appropriate statements for label
Ⓐ, Ⓑ, Ⓒ and Ⓓ (you are not required to copy the flowchart to your answer
book).

91. i)The following flowchart shows an algorithm that reads two numbers and
display smaller number.OL2017

Write the pseudocode for the algorithm in the flowchart given above.
Ii)The following flowchart reads three numbers and finds the smallest .
Write down the correct expression for missing labels Ⓟ and Ⓠ

92. Consider the given flowchart that finds the product of an integer with all
the integers below it. OL2018

Regunathan Umapathy BSc https://ictmcq.home.blog Page 19 of 22


Answers
1. N=10
DO while N>=5
N=N-1
LOOP
In the above code loops as long as N>=5, Initial value of N = 10 in the loop
that value reduce 1 by one till N = 5 i.e. it repeats when the value of N =
10, 9, 8, 7, 6, 5 so it repeats 6 times.
2. Input Name followed by Input Age so it's a sequence. ? Age >= 18 means
selection. Answer: both sequence and simple selection.
3. Out of the given answers most suitable answer (invalid reason) "is The
teacher deletes the part mentioned above in (A) because it is incorrect".
4. Initial value of p = 2; so p:=2*2*3*4 = 48
5. If you know how many times the loop should repeat we should use for loop.
Answer: for-statement.
6. Read T, T<=25, Yes, "Cold", No, Anymore? (① is a ▱ parallelogram so ①
should be an input or an output, by looking at the given answers all
mentioned it as Read T. The second ◇ is to make decision there anymore is
not suitable reason for this is whether you have some more inputs which more
suitable for ⑥ hence we can eliminate 2 answers. Suppose if ③, ④, ⑤ are
T<26, No, "Cold” then if we substitute for T with 27, 27<26 is false so it
displays "cold" as per the question if temperature less than 26°C only
needs to show "Cold" so it's incorrect. Only reaming answers is Read T,
T<=25, Yes, "Cold", No, Anymore? )
7. Initially X = 1, Y = 1. The condition X=Y is true so the loop begins. Inside
the Z = X+Y so it becomes 2, Y = 2 again substitutes values X=Y becomes 1=2
is false so it comes out of the loop and display Z i.e. 2.
8. Loop begins as the condition M > 5 i.e. 6>5 is true. But the variable remain
unaltered during the execution of the program the so the program never ends.
9. Out the given answers order of execution is (), *, /, -, +
10. (A)Loop - (S)A programming technique that repeats a sequence of instructions
until a specified condition is met.
(B)Selection - (R) A condition that is used to choose one out of two things.
11. Value of X is initially 20 it becomes 16, 12, 08, 04, 0 and when the X
becomes -4 it satisfies the condition and comes out of the loop.
12. MOD
13. Hot, Hot, Cold
14. If Then Else construct i.e. B only (loop is incorrect as the flowchart needs
to be from bottom to top)
15. Real
16. Incorrect ones - The value of a variable remains unchanged.
17. *, /, +
18. 5, 2, 10 (Result = numberOne/numberTwo; numberOne=Result*numberTwo, In the
given question numberOne is at the end so the multiplication of first two
numbers result the last one so out of the given answers most suitable one is
5, 2, 10)
19. X=X-3, Is X>15, Print X (In flowchart ▭ represents process, ◇ represents
decision, ▱ represents input/output in the same order as in the question.
decision needs to be ◇ represented like this and the symbol for the
decision there is only one answer like this i.e. Is X>15)
20. X<=15 (while loop repeats when the condition X>15 is true, so to terminate
we need to look at the condition that is false. i.e. X<=15).
21. 15 (Initial value of X 21, in the decision ◇ X>15 so 21>15 is true it
chooses the path with Yes, there in the process ▭ X = X-3 when you
substitute for X becomes X = 21-3 = 18 Again X>15 i.e. 18>15 so again it
chooses the Yes path. There is the process ▭ X = X-3 substituting the
value for X, X becomes X = 18-3=15 Again in the decision ◇ X>15
substitute the value for x 15>15 is false so it chooses the No path ▱
Print X shows the current value of X i.e. 15).
22. When it is 15 the condition is true so there will be another iteration so
the value becomes 12.
23. It displays the total when the counter is 3 (Students can come to this
answer by looking at the decision ◇ i.e. Is counter less than 3?).
Regunathan Umapathy BSc https://ictmcq.home.blog Page 20 of 22
24. total = total+num
25. For-Next loop can be used when the number of
repetitions is known in advance.
26. Sequence, Selection
27. Either A or B
28. 100
29. 50
30. It gives the message "You are very close" when the user enters the value 6
31. 1234
32. Iteration, Selection
33. X>10
34. 3840 (output needs to multiplied by 10 so the number will end with 0 so we
can easily eliminate two answers).
35. 5
36. Sequence, Selection and Iteration only
37. It prints the value 2 as one of its outputs.
38. Inputs: A, E processes B, C output: D
39. 14
40. repetition, selection and sequence
41. x = 7
42. 225
43. 225
44. an algorithm, the syntax, a flowchart
45. Sumith only
46. 5
47. 11
48. num=2
49. Statement 2 is executed at least once but Statement 1 is executed depending
on the condition.
50. 1st answer
51. 0, i, 10
52. 4 (Repetition will take place when the value of count = 9, 7, 5, 3)
53. 16 (While loops happen when the condition is true so the OddTotal=
1+3+5+7=16 corresponding to count value 0, 1, 2, 3)
54. If average_marks > 50 AND failed_subjects = 0 Then scholarship = 'True' (If
followed by If known as the nested if, it could be replaced with AND).
55. 11, 3 Since the correct answer was not given so it's open.
56. A:Ⓠ, B:Ⓡ, C:Ⓢ, D:Ⓟ
57. A:Ⓡ, B:Ⓠ, C:Ⓟ, D:Ⓢ
58. 2nd answer
59. num>=100
60. Output Min, Min=N
61. SELECTION occurs within REPETITION
62. 6 times
63. 2nd answer
64. X = 7, Y = 7, Z = 7
65. Num = 6, Count = 4 (Students can calculate the Num = n(n+1)/2 =3*4/2=6)
66. 4 times
67. 20, 10 (Given X = 10, Y = 20, X<Y is true so Z = Y means Z = 20, Y =X
means Y = 10, X = Z means X = 20 so display X, Y means 20, 10).
68. number>=1O
69. 4th answer (if know in advance how many times the loop should repeat better
to look at forloop)
70. 3 times as the correct answer was not given it was an open question.
71. if average>70 AND Sport_colour = 'True' then Allrounder_award = 'True'
(nested if should be replaced with AND).
72. Ⓟ = D, Ⓠ = C, Ⓡ = A, Ⓢ = B (▱ indicates input/output, ▭ indicates
process and ◇ refers to decision).
73. Selection inside Iteration
74. 36 (The loops repeates when the value of Student_count <= Total_Stdents so
it repeats till Student_count = 35, inside the loop
Student_count=Student_count+1 so the Student_count becomes 36 and comes out
of the loop).

Regunathan Umapathy BSc https://ictmcq.home.blog Page 21 of 22


75. While-Do (If then and If then else are not suitable answers as they are
related to decision and not related to iteration. Do while the condition is
checked at the end while in the given flowchart condition is checked at the
begnning so the suitable one is while do).
76. If distance = 101 and vehicle-type = 'Bus' then Payment-option will be made
'False'.
77. A[7]
78. 0
79. N<=100, Yes, No
80. 3rd answer.
81. All A, B and C
82. All A, B and C
83. 375 (Units <=50 is false also Units>50 and units<=150 is also false so it
will choose the ELSE part means amount = 250+(units-150)*25 substituting the
values = 250+(175-150)*5=375
84. 5 (given logic calculates the maximum value)
85. Only A is correct
86. 70 (The given logic calculates the maximum value so it's 70).
87. Repeat until loops repeats until the condition becomes true. After executing
the statement Sum = Sum+ count*count i.e. sum=0+5*5=25 until count > 0 is
true so loops terminates and prints the value 25
88. 1*2*3*4*5=120
89. While loop happen as long as the condition is true. Given number 12 > 5 so
initially the condition is true. If number>=10 is also true i.e. 12>=10 is
true so the number becomes number/2 i.e. 12/2=6 Again in the while loop the
condition is true i.e. 6>5 so the loop repeats if number >= 5 is false i.e.
6 >= 5 is false so it chooses the else part number = 6+4=10. Again the While
loop condition is true i.e. 10 >= 5 in the if part is also correct i.e. 10
>=10 is true so number = 10/2=5 now the while loop condition is false i.e. 5
> 5 is false so it comes out of the loop and display number i.e. it will
display 5.

Regunathan Umapathy BSc https://ictmcq.home.blog Page 22 of 22

You might also like