0% found this document useful (0 votes)
9 views2 pages

Quiz-2 - Solution

Quiz-2 - Solution
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)
9 views2 pages

Quiz-2 - Solution

Quiz-2 - Solution
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/ 2

FCS CS329 PAGE 1

COMPUTING AND AI
QUIZ # 2
REG#: ___________________________ NAME: ____________________________________

COURSE CODE: CS101 INSTRUCTOR: MUHAMMAD SAJID ALI

TOTAL MARKS: 15 DATE: 12/10/2023


--------------------------------------------------------------------------------------------------------------------------------------------------------------

Question 1: MCQs and fill in the blanks. Marks 5 (CLO1, PLO1)

1. The role of the _______ is to transform the source code into machine code?
a) Compiler.
b) Linker.
c) Preprocessor.
d) Debugger

2. The preprocessor is responsible for handling _______ statements.

a) Input/Output
b) #include
c) Compiler
d) Conditional

3. In a C++ program, the main () function serves as the _______ of the program.
a) Beginning
b) Middle
c) End
d) None of the above

4. In C++, the main function is the entry point of the program.

5. What is the typical return value of the main () function in C++.


e) 0
f) 1
g) Any positive value
h) Any negative value

Question 2: Create a flowchart that calculates and shows the result of multiplying all even numbers between 'number1'
and ‘number2’. The values of ‘number1’ and ‘number2’ will be provided by the user. Marks 10 (CLO2, PLO1)

[Hint] Construct the algorithm as your rough work first and use that to draw a flowchart.
FCS CS329 PAGE 2

You might also like