0% found this document useful (0 votes)
1 views

Computer Science HSSC-II (D)

The document outlines an examination paper for Computer Science HSSC-II, detailing the structure, sections, and types of questions included. It consists of two sections: Section B with 14 questions requiring brief answers and Section C with 5 questions that require more detailed responses. The topics covered include operating systems, software development life cycle, C++ programming concepts, and data handling techniques.

Uploaded by

irtazabangash5
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views

Computer Science HSSC-II (D)

The document outlines an examination paper for Computer Science HSSC-II, detailing the structure, sections, and types of questions included. It consists of two sections: Section B with 14 questions requiring brief answers and Section C with 5 questions that require more detailed responses. The topics covered include operating systems, software development life cycle, C++ programming concepts, and data handling techniques.

Uploaded by

irtazabangash5
Copyright
© © All Rights Reserved
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 any three features of Multi-user Operating How is an argument pass by value different from an
(i) 03 OR 03
System. argument pass by reference?

How is multi-threading different from multi-tasking? Give


(ii) Describe any three objectives of SDLC. 03 OR 03
any three reasons.

Briefly explain the three steps of requirement engineering Write down any three differences between post-tested and
(iii) 03 OR 03
phase of SDLC. pre-tested loops with example.

How is a project manager responsible for planning


(iv) Write down the use of string stream in file handling. 03 OR 03
execution and closing of a project?

Rewrite the following for loop into do-while loop.


Briefly explain the concept of two-dimensional array with
(v) for(int n=0;n<10;n++) 03 OR 2+1
an example.
cout<<n<< “ ”;
Write down the output of the following code-segment.
int p,q,r;
p=10; q=3;
(vi) Write down the purpose of sizeof( ) function in array. 03 OR if(p%q==3) 03
r=0;
else
r=1; cout<<r;
Write a c++ code that prints sum of following. Differentiate between strlen( ) and strcat( ) functions with
(vii) 03 OR 2+1
int arr[10]={1,2,3,4,5,6,7,8,9,10}; an example.

Briefly explain how a pointer variable is declared by using Write down a piece of code in c++ that shows the use of
(viii) 03 OR 03
an example. inline function.
Given the array definition:
Write a piece of code that shows how a string copies into float a[5]={1,2,3};
(ix) 03 OR 1+2
another string using strcpy( ) function. a. How many elements are there in the array?
b. What are the values of the first and last elements?

(x) Differentiate local and global variables. 03 OR Briefly explain the concept of data hiding in c++. 03

Explain the difference between the following statements if Write down the use of function overloading in terms of:
P is a pointer variable:  Number of arguments
(xi) 03 OR 03
cout<<P;  Datatypes of arguments
cout<<*P;  Return types
Write a c++ code that reads 03 characters from user and
(xii) How is constructor different from destructor? 03 OR 03
stores them in a file.

Briefly explain the concept of polymorphism with daily life


(xiii) How is a binary file different from a text file in c++? 03 OR 2+1
example.
Rewrite the following code by using the conditional
Write down the output of the following code:
operator:
int i,j,k;
(xiv) if(a==b) 03 OR 03
for(i=0,j=2,k=1;i<=2;i++)
cout<< “equal”; else
cout<<i+j+k;
cout<< “Not equal”;
SECTION – C (Marks 20)

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


Q.3 Why is feasibility study important? Discuss any four Write down the use of type casting in c++. Briefly 2+2
types of it. 1+4 OR explain two types of casting with example. +1
Q.4 Write down a c++ program by using class that input What is the purpose of setw in c++? Also compare
two values using a member function of a class named 2+2 the use of setw and endl manipulators in c++. 2+2
+1
OR +1
input( ), then display the sum of two values by using
another member function named show( ).
Q.5 Explain use of exit( ) function in c++ with an example. Write a c++ program that prints all the positive odd
4+1 OR numbers upto 30 skipping those that are divisible by 05
5 using continue statement.
Q.6 Explain the concept of function. Also explain the use Name four functions of operating system and explain
2+2 2+2
of function definition and function call with the help +1
OR any two functions in detail. +1
of examples.
(D) ——

You might also like