Professional Documents
Culture Documents
Instructions:
• All questions are compulsory
• Using CamScanner Android App is recommended for taking photos. iOS may not have this app. So in case you
have an Apple phone use some good app to take photos
• Remember, photos MUST be clear enough to read otherwise Marks will be DEDUCTED
• IMPORTANT:
a. Solve the questions by hand, take photo of the solution of each question using
CamScanner App and PASTE on mentioned space in this MS Word answer sheet.
b. When solutions of all questions are pasted in the MS Word file, SAVE the file as PDF and upload.
c. Typed solution will not be accepted/subject to 50% penalty.
Q.1: Differentiate between the following (write at least 3 differences between each):
12 marks (2+2+2+2+2+2)
A. Compiler and interpreter
Answer (paste photo of solution here):
B. Special purpose and general purpose computers
Answer (paste photo of solution here):
C. WORMS and CD ROM
Answer (paste photo of solution here):
D. Mainframes and super computers
Answer (paste photo of solution here):
E. Pens and stylus
Answer (paste photo of solution here):
F. RAM and ROM
Answer (paste photo of solution here):
Q.2. Create pseudo code and C++ code for the following with the constraints mentioned:
(18 marks)
𝑥3
A. 𝑦3
+ 𝑥2 - 𝑦2 (notice that y MUST not be ZERO. Replace ‘x’ with your first
name and ‘y’ with your last name) (5 marks)
Answer (paste photo of solution here):
B. Create a four-function calculator. Use floating point numbers. It should be able to carry out
the specified arithmetical operation: adding, subtracting, multiplying, or dividing the two
numbers. Apply necessary conditions and constraints such that user is not able to input
inappropriate numbers. (5 marks)
Create a program that encourages the user to enter two fractions, and then displays their sum in
fractional form. It is important to use appropriate language/commands and variable names for
‘cin’ and ‘cout’. (5 marks)