Week 1 2019
Week 1 2019
Week 1 2019
1. Algorithm is-
a) A process or set of rules to be followed in calculations or other problem-solving operations,
especially by a human.
b) A process or set of rules to be followed to solve numerical problems only.
c) A process or set of rules to be followed in calculations or other problem-solving operations,
especially by a computer.
d) A process or set of rules to be followed in to solve logical problems only.
Solution: (c) A process or set of rules to be followed in calculations or other problem-solving operations,
especially by a computer
3. The software tool that helps a user to interact with computer for a specific purpose are called
a) Operating system
b) Application software
c) Hardware
d) None
7. CPU uses the _____________ to get the address of the next instructions
a) Register
b) Instruction Register
c) Program Counter
d) RAM
Solution: (d) Flowchart is basically a diagrammatic representation of the algorithm. Whereas in pseudo code
normal English language is translated into the programming languages to be worked on.
a) 20
b) 21
c) 10
d) 0.33
10. The input N from the user is 9. The output of the following algorithm is
a) 81
b) 720
c) 40320
d) 362880
Solution: (d) The flowchart finds the factorial of the number 9. Hence, the right answer is 9!=362880
11. The following algorithm is used to find a number X is even or odd. What will be the content of the
empty box? [Note: The modulo operator (%) returns the remainder of the left side divided by the right
side. So 5%2 will evaluate to 1. (5 / 2 = 2 remainder: 1).
WEEK 1 ASSIGNMENT SOLUTION
a) X%10=0?
b) X/10=0?
c) X/2=0?
d) X%2=0?
Solution: (d) To find whether a number is odd or even, the number has to be divided by 2. If it is equals to
zero, then the number is even. Thus, X%2=0? Condition is appropriate.
a) 10
b) 33552211
c) 1253
d) 0
Solution: (c) The algorithm finds the reverse of the number X. Hence, the output is 1253
13. The section of the CPU that selects, interprets and sees to the execution of program instructions
a) Memory
b) Register Unit
c) Control Unit
d) ALU
Solution: (c) Control unit of the computer helps in maintaining sequence of steps and execute the program
14. In finding maximum number of 3 different numbers, how many decision box will be drawn in the
flow chart
a) 3
b) 4
WEEK 1 ASSIGNMENT SOLUTION
c) 2
d) 1
In this above example, two comparisons made with the value of max. It can be presented with two decision
boxes in a flowchart.
15. The ________ scans the entire C program and translates it as a whole into machine code.
a) Interpreter
b) Compiler
c) Program counter
d) Operating system