0% found this document useful (0 votes)
42 views1 page

Computer Science HSS-II (B)

The document outlines an examination paper for Computer Science HSSC-II, detailing the structure and content of Sections B and C. Section B consists of 14 questions covering various topics in computer science, including operating systems, programming concepts, and file handling, with a total of 42 marks. Section C requires students to write C++ programs and explain programming concepts, totaling 20 marks.

Uploaded by

irtazabangash5
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)
42 views1 page

Computer Science HSS-II (B)

The document outlines an examination paper for Computer Science HSSC-II, detailing the structure and content of Sections B and C. Section B consists of 14 questions covering various topics in computer science, including operating systems, programming concepts, and file handling, with a total of 42 marks. Section C requires students to write C++ programs and explain programming concepts, totaling 20 marks.

Uploaded by

irtazabangash5
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/ 1

COMPUTER SCIENCE HSSC–II

Time allowed: 2:40 Hours Total Marks Sections B and C: 62

SECTION – B (Marks 42)


Q. 2 Answer the following questions briefly. 14x3=42
Write down one application for each of the following types
Write down any three differences between process and
(i) of operating systems. 03 OR 03
thread.
a. Time-sharing b. Real time c. Embeded
How is protection system important in an operating
(ii) 03 OR Write down any three responsibilities of system analyst. 03
system?

(iii) Briefly describe any three types of deployment phase. 03 OR Briefly describe the five states of process with diagram. 03

Write down any three differences between if-else-if and What is understood by functional and non-functional
(iv) 03 OR 03
switch statements. requirements in requirement gathering phase of SDLC?
What will be the output of the following code segment?
What will be the output of following code segment? for(int i=0; i<3;i++)
int i=3; {
(v) int j=i++; 03 OR cout<< “Enter a character”; 03
int k=++i; cin>>ch;
cout<<i<< “ ” <<j<< “ “ <<k; out.put(ch);
}
Write down the output of the following code segment.
What will be the output of the following code? {int a=7, b=12;
int m=5, c=0; fun(a,b);
while(c<100) cout<<a<< “ ” <<b;
{ }
(vi) 03 OR 03
m=m+1; void fun(int m,int &n)
c=c+1; {
} n=n-2*m;
cout<<m; m=2*m;
}
int arr[3][4]={{12,0,5,10},{7,8,19,30},{33,1,2,22}}; Write a program that inputs a string and displays the
(vii) 03 OR 03
Write down a statement that replaces 19 with 50. number of character in it.
Fill in the following table with Yes/No. Consider the following array declaration:
Access Public Private int arr[8];
(viii) Access of members in same class 03 OR a. How many elements are there in the array? 03
Access of members in derived class b. Determine the highest index of the array.
Access of members outside the class c. Determine the lowest index of the array.
(ix) What are strings? Briefly explain how to declare a string. 1+2 OR Differentiate between local and static variables. 03

Compare binary files with text files in light of file handling


(x) 03 OR Briefly describe any three modes of file opening in c++. 03
in c++.
How is an array different from a simple variable? Explain
(xi) What is the use of reference operator (&) in pointers? 03 OR 03
with an example.
Write down the syntax of using the BOF function in file Briefly explain the concept of data hiding in classes using
(xii) 03 OR 03
handling. an example.
Write down any two advantages and one disadvantage of Briefly explain the following terms related to array:
(xiii) 03 OR 03
function overloading. a. Size of array b. Name of array c. Index

(xiv) Explain the role of Project manager in SDLC. 03 OR What is the use of break statement in c++? 03

SECTION – C (Marks 20)

Note: Attempt the following questions. (5x4=20)


Q.3 Write down a c++ program that finds the area and Why we use pointers? What is the difference between
3+1
perimeter of a square. 05 OR pointer variable declaration and initialization? +1
Explain with example.
Q.4 Write a c++ program that contains two integer data Explain the difference between constant and variable
members which are initialized to 100 when an object is with the help of programming examples.
05 OR 3+2
created. It has a member function avg() that displays
the average of data members.
Q.5 Explain the use of following in c++ by using Write down the importance of using functions in c++.
examples. Also explain the following components of function: 2+2
05 OR
 Continue statement  Function definition +1
 Exit function  Function call
Q.6 Write a c++ program that inputs a positive integer and Explain the concept of function signature. Also write
prints whether it is prime or composite. 05 OR down any four advantages of using functions in c++. 1+4

(B) ——

You might also like