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

Computer Science II Section BC

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 programming and theoretical questions. The total marks for Sections B and C are 62, with specific marks allocated to each question.

Uploaded by

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

Computer Science II Section BC

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 programming and theoretical questions. The total marks for Sections B and C are 62, with specific marks allocated to each question.

Uploaded by

Rizwan Aslam
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 parts briefly. 14x3=42

Compare if else if and switch statements. What is Requirement Engineering Phase? Also write
(i) 03 OR 03
(Any three points) its types.
Explain the following briefly:
What is the difference between binary and text files?
(ii) a. File Management 03 OR 03
Write any three differences.
b. Network Management
How is DOS better than Windows? Write any three Why is type casting used? Briefly explain types of type
(iii) 03 OR 03
reasons. casting with example.
Write down the output of the following program
statement:
for(n=1;n<15;n++)
{
(iv) if(n>5)&&(n<10)
03 OR What is meant by array? Give its two advantages. 03
continue;
cout.<<n<< “ ”;
}
What are Parameters? Write its types along with
(v) 03 OR Briefly explain Null Pointer along with example. 03
example of each.
Write any three differences between Pointer and An Write a program that prints sum of all positive numbers
(vi) 03 OR 03
Array. up to 15 using while loop.
Rewrite the program statements after removing errors:
int a (20) ‘j’
(vii) cout>>” enter twenty numbers; 03 OR Write any three responsibilities of Project Manager. 03
for (i=0: i<20;I--);
cin<<a(j);
Briefly explain the function of any three modes of
(viii) 03 OR Briefly explain Data Hiding. 03
opening a file.
Write any three differences between Destructor and
(ix) 03 OR Briefly explain the purpose of memory address. 03
Constructor.
What will be the display after executing the following
statements?
int x = 6, y = 21; Write down the purpose and syntax of break
(x) 03 OR 03
cout<<x/y<< “/t” <<y/x<< “/t” statement.
<<x%y;
What is the difference between multiprogramming
What is the difference between constant and variable?
(xi) 03 OR operating system and Multiprocessor operating 03
Also give example.
system?
Write down the output of following statements:
a. A=(y>0)&&(x<10) where y=7, x=15
(xii) Write the purpose and syntax of static variable? 03 OR
b. n*2; where n=10
03
c. S=21+16%4
Write a program using nested loop that prints following
pattern:
1 2 3 4 5
(xiii) Write the difference between bof( ) and eof( ). 03 OR 1 2 3 4 03
1 2 3
1 2
1
Write any three differences between Real-Time
(xiv) Briefly explain the testing phase in SDLC. 03 OR 03
operating system and Time sharing operating system.
SECTION – C (Marks 20)

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


Q.3 Write a program that reads integers in an array and Consider the following header files and complete the
finds their total and average. table:
Header File Purpose
iostream.h
05 OR 05
conio.h
math.h
string.h
iomanip.h
Q.4 Write a program that reads 5 integer values in array a Write a C++ code that defines a function named
and finds their total and average. Celsius that takes Celsius temperature as input and
05 OR 05
returns its equivalent temperature in Fahrenheit.
F=9/5(C+32)
Q.5 Describe the states of a program with diagram. Explain in detail continue ( ) function along with
05 OR 05
example.
Q.6 Write a program to read a number from the keyboard Explain inheritance and polymorphism in detail. Give
and then pass it to a function to determine whether it 05 OR one daily life example each. 05
is prime or composite.
—— 2HA-II 24007 ——

You might also like