Assignment 1 July 2022 Solution
Assignment 1 July 2022 Solution
1. The input given from keyboard is converted to computer understandable unit (bit) by the standard
a) ISO
b) ANSI
c) ASCII
d) EBCDIC
Solution: (c) ASCII is the standard for character to equivalent number (in bits) conversion.
In high-level language, testing and debugging a program is easier than assembly language.
The role of a compiler is to translate source program statements to object codes.
Solution: (a) X and Y both have same values but different locations.
a) 4
b) 8
c) 16
d) 20
a) 21
b) 28
c) 30
Week 1 Assignment Solution
d) 40
Solution: (b) The flowchart finds the sum of first 7 natural numbers. Hence, the right answer is 28.
7. The print values of ‘a’ and ‘b’ of the flowchart below are
a) a=4,b=6
b) a=6,b=4
c) a=10,b=2
d) a=2,b=10
Solution: (b) The algorithm finds the swap of two numbers. Hence, the output is a=6,b=4
8. The program which translates high level program into its equivalent machine language program is
called
a) a translator
b) a language processor
c) a converter
d) None of the above
Solution: (a) translator. Generally, there are three types of translator-compilers, interpreters, assemblers.