Final Model Paper Computer Science HSSC-II
Final Model Paper Computer Science HSSC-II
Final Model Paper Computer Science HSSC-II
ROLL NUMBER
⓪ ⓪ ⓪ ⓪ ⓪ ⓪ ⓪ ⓪ ⓪ ⓪ ⓪
① ① ① ① ① ① ① ① ① ① ①
② ② ② ② ② ② ② ② ② ② ②
Answer Sheet No.
③ ③ ③ ③ ③ ③ ③ ③ ③ ③ ③
④ ④ ④ ④ ④ ④ ④ ④ ④ ④ ④
⑤ ⑤ ⑤ ⑤ ⑤ ⑤ ⑤ ⑤ ⑤ ⑤ ⑤ Sign. of Candidate
⑥ ⑥ ⑥ ⑥ ⑥ ⑥ ⑥ ⑥ ⑥ ⑥ ⑥
⑦ ⑦ ⑦ ⑦ ⑦ ⑦ ⑦ ⑦ ⑦ ⑦ ⑦
⑧ ⑧ ⑧ ⑧ ⑧ ⑧ ⑧ ⑧ ⑧ ⑧ ⑧ Sign. of Invigilator
⑨ ⑨ ⑨ ⑨ ⑨ ⑨ ⑨ ⑨ ⑨ ⑨ ⑨
COMPUTER SCIENCE HSSC–II
SECTION – A (Marks 13)
Time allowed: 20 Minutes
Q.1 Fill the relevant bubble for each part on bubble sheet. Each part carries one mark.
1. Which one of the following states transitions is valid?
A. Ready to Blocked B. Blocked to Running
C. Running to Ready D. Terminated to Running
2. In which SDLC phase, the Project team must decide whether the project should go
ahead with available resources or not:
A. Coding phase B. Maintenance phase
C. Analysis phase D. Planning phase
3. Which one of the following DOS commands is used to display content of the
directory?
A. DIR B. CD
C. MD D. VIEW
4. Identify the type of system conversion in which the old system is directly replaced
by the new system:
A. Pilot B. Parallel
C. Direct D. Phased
5. If a = 10; b = a++; what will be the value stored in b?
A. 1 B. 9
C. 10 D. 11
6. Which one of the following statements transfers the control to the start of loop body?
A. Switch B. Continue
C. Break D. Exit
7. If x = 5, which one of the following accesses the seventh element stored in an
array A?
A. A[x++] B. A[++x]
C. A[7] D. A[x]
8. The phenomenon of having two or more functions in a program with the same
name but different numbers and types of parameters is called:
A. Inline function B. Nested function
C. Function overloading D. Recursive function
10. Which one of the following indicates the address of a variable “temp” of type
float?
A. float temp& B. &temp
C. &float temp D. temp&
11. Which one of the following is the default access specifier of C++ class?
A. Private B. Public
C. Protected D. Default
12. Identify the header file needed to read, write, and manipulate the file:
A. ifstream B. ofstream
C. istream D. fstream
13. Which one of the following functions is used to write a single character to a file?
A. get( ) B. gets( )
C. put( ) D. write( )
Federal Board HSSC-II Examination
Computer Science Model Question
Paper(Curriculum 2009)
Note: Answer all parts from Section ‘B’ and all questions from Section ‘C’ on the E-sheet. Write
your answers on the allotted/given spaces.
ii. Write down the reasons of the following invalid variable names: (3)
i. 3a ii. S$ iii. long
iii. Write down any three differences between text and binary files. (3)
OR
How is Constructor different from Destructor? List down any three differences.
int x = 3, y = 17;
cout << x / y << y / x << (y / x) + (x % y);
OR
Write down the output of the following statements:
a. A = (x > 0) && (y < 10) where x = 5, y = 15
b. S = 13 + 21 % 4
c. m *= 2; where m = 12
vi. Write down the purpose and syntax of break statement. (1.5+1.5)
OR
Write down the purpose and syntax of exit() function.
vii. Why is it important to write Comments in a program? Also differentiate its two types.
(1+2)
viii. Write down the output of the following program segment: (3)
char c = ‘A’;
do
{
cout << c << ”\t”;
c = c + 2;
}
while (c <= ‘K’ );
OR
Page 1 of 3
Write down the output of the following program segment:
int values [ ] = {4, 17, 20, 9, 23};
cout << values [2] << "\n";
x. What is the difference between array size and index? Illustrate with example. (1+2)
xi. Compare local and static variables in terms of scope, lifetime, and storage duration.
(3)
OR
Write down any three differences between actual and formal parameters.
xii. Rewrite the program segment after removing errors: (3)
int a{10}, i;
cout >> ” enter ten numbers ;
for (i = 0; i < 10; i--)
cin << a{i};
OR
xiv. Define a class Student that contains public data members including function get().
(3)
SECTION – C (Marks 20)
Note: Attempt all questions. Marks of each question are given within brackets. (45=20)
Q.3 Write a C++ program that displays the following menu: (5)
Geometry Calculator
1. Display Area of a Circle
2. Display Area of a Rectangle
Enter your choice (1-3):
If user enters 1, the program should ask for the radius of the circle and then displayits
area. Use formula: area = πr2.
If user enters 2, the program should ask for the length and width of the rectangleand
then displays its area, use formula: area = length x width.
Display an error message if the user enters a number outside the range of 1 - 3.
Page 2 of 3
Q.4 What is the importance of SDLC? Explain in detail the Feasibility and Testing phases.
(1+2+2)
OR
Explain the Batch processing and Real-Time operating systems with one example of each.
(2.5+2.5)
Q.5 Explain the concept of Polymorphism and Inheritance with one example of each from daily
life. (2.5+2.5)
OR
Consider the following statements and complete the following table: (5)
Q.6 Write a program that prints product of three numbers by using default arguments in function.
(5)
OR
Write a C++ code that defines a function named Celsius, that takes Celsius temperature as an
argument, and returns its equivalent temperature in Fahrenheit. (Use formula: F = 9/5 (C + 32 )
(5)
Page 3 of 3
Federal Board HSSC-II Examination
**Cognitive Level
K: Knowledge
U: Understanding
A: Application
***Difficulty Level
E: Easy
M: Moderate
D: Difficult
ASSESSMENT GRID FOR COMPUTER SCIENCE HSSC-II MODEL PAPER 2023
Analysis of questions of Syllabus (content) and Assessment Objectives
Unit 1: Unit 2: Unit 3: Unit 4: Unit 5: Unit 6: Unit 7: Unit 8: Unit 9: Total
Operating System Object Control Arrays and Functions Pointers Object File mark Total %
System Developm Oriented Structure Strings 15% 5% s and Handling s Covered
Assessment Objectives 10% Marks
10% ent Life Programmi 15% 15% Classe (111)
Cycle 10% ng Using s 10% 100%
C++ 10%
Section - A 1-iii-(01) 1-ii-(01) 1-vi-(01) 1-viii- 1-ix-(01) 1-xi- 1-xii-(01)
1-iv-(01) (01) (01) 1-xiii-(01) 9
Knowledge
based
Section - B 2-iv-(03) 2-vi-(03) 2-xiii-(03) 2-xiii-(03)
15
34 30.6
2-vi-(03)
Section - C 4(05) 4(05) 10
Section - A 1-i-(01) 1-v-(01) 1-vii-(01) 1-x-(01) 4
Section - B 2-i-(03) 2-ii-(03) 2-viii-(03) 2-viii-(03) 2-xi-(03) 2-iii- 2-iii-(03)
Understandi 2-xv-(03) 2-x-(03) 2-xi-(03) (03)
ng based 2-xv-(03) 2-xii-(03) 42 56 50.5
2-vii-(03) 2-xii-(03)
Section - C 5(05) 5(05) 10
Section - A 0
Section - B 2-ix-(03) 2-xiv-
Application 6
based (03) 21 18.9
Section - C 3(05) 6(05)
15
6(05)
Total marks 10 10 13 18 16 17 5 12 10 111 100
Percentage 9 9 11.7 16.2 14.4 15.3 4.5 10.8 9 100
KEY: 1-i-(01) : Question No - Part No - (Allocated Marks)