The Islamia University of Bahawalpur, Pakistan: Al-Noor Post Graduate College Head Rajkan

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

The Islamia University of Bahawalpur, Pakistan

DEPARTMENT OF COMPUTER SCIENCE & IT

Al-Noor Post Graduate College Head Rajkan

Class: MCS (1st Semester) Mid Term Session: 2017-19


Subject: Programming Fundamentals Code: CSIT-21101
Time: 60 Minutes Total Marks: 20
Name: ________________________________ Roll. No. ________

Q 1: Encircle correct option. (5)


1. To check the remainder of two integers _________________ is used
(a) / (b) % (c) | (d) \
2. C++ uses
(a) Compiler (b) Interpreter (c) Assembler (d) None
3. Which variable declaration is wrong
(a) stdNum1 (b) 1std Num (c) std_num1 (d) stdnum1
4. Unary operators operates with
(a) 1 operands (b) 2 operands (c) 3 operands (d) 4 operands
5. ______________ are ignored by compilers.
(a) Statements (b) Header Files (c) Comments (d) Data Items
6. There are __________________ reserved words in C++
(a) 61 (b) 62 (c) 63 (d) 64
7. C is ___________________________ language.
(a) Procedural (b) Object Oriented (c) Artificial (d) Semantic
8. To check equality in C++ which operator is
(a) = (b) = = (c) = = = (d) isEqual( )
9.<< is also called _____________________ Operator
(a) Insertion (b) Extraction (c) Unary (d) Binary
10. No of Logical Operators
(a) 2 (b) 3 (c)4 (d) 5
Q2: Answer the following short question. (8)
1. What is Const Qualifier in C++?
2. Differentiate between compiler and interpreter?
3. Write the structure of C++ program that print “C++ rocks” on console
4. What is integer underflow and integer overflow? Give the example.

Q 3: Write a program to print the following menu to take user’s choice


(i) Enter 1 for conversion of Fahrenheit to Celsius
(ii) Enter 2 for conversion of Celsius to Fahrenheit
And precede the choice entered by the user.
Hint: C= 5 x F – 32 / 9 and F = 9 x C / 5 + 32
(7)
Answers Keys C++ 21101 (Paper 02)

1. b
2. a
3. b
4. a
5. c
6. c
7. a
8. b
9.a
10. b

You might also like