HSSC Computer Science List of Practical and Questions
HSSC Computer Science List of Practical and Questions
H-8/4, ISLAMABAD
COMPUTER SCIENCE HSSC
(National Curriculum 2009)
PRACTICAL EXAMINATION 2024
S# List of Practicals
Recognition Recognize Internal or external components of system unit.
and Steps Steps of task related to computer system.
Database Create two tables with at least five fields having different data types, also specify
appropriate primary keys.
Create relationship between them Enter at least five records using forms
Design a query or report depending on specific criteria
C++ Program using: cin, cout, escape sequences, setw
Solving arithmetic problems to calculate interest, percentage, average, ratio, grades
etc.
Calculate area / volume / perimeter of some basic geometrical shapes
Comparing numbers
Solving quadratic equation
Finding out the GCD and LCM
Reading a number and find out whether it is prime or composite
Generating and summing simple series
Sorting a list of items (numeric / string)
Searching an item out of a list of items (numeric /string)
Finding addition and multiplication of matrices (Maximum 3 x 3)
Finding the transpose of a matrix (Maximum 3 x 3)
Reversing a given number / string
Generating random numbers for a dice using function
Finding out a specific day of a week for a given data using function
Sum two and/or three numbers of different data types
Display the address and the value of a variable using pointer
Create and display student object with data members as name, age, and class etc.
Create and read a data file
Questions to be asked in place of Practical notebook and viva voce. (Total Marks 10)
Write answers of any five (05) of the following questions on your answer sheet.
Page 1 of 2
2. Rewrite the following using if-else statement: (2)
cout << ( ( marks >= 50 ) ? “Pass” : “Fail” ) ;
3. What does the following program segment display? (2)
int values [ ] = {3, 16, 22, 7, 36};
cout << values [2] << "\n";
cout << values [1]++ <<"\n";
4. What will be the output of following program segment? (2)
{
float x = 46, y;
float *Px;
Px = &x;
y = *Px
cout << "*Px = "<< *Px << endl;
cout << "y = "<< y << endl;
}
5. What will be the value of ‘y’ after executing the following code? (2)
int x = 5, y = 5;
(x > y) ? y++ : y - -;
cout<<"y = "<< y;
6. What is wrong with the following switch statement? (2)
switch (temp)
{
case temp < 0 : cout << "Temp is negative.\n";
break;
case temp = = 0: cout << "Temp is zero.\n";
break;
case temp > 0 : cout << "Temp is positive.\n";
break;
}
7. Correct the following code segment: (2)
void area (int length = 30, int width)
{
return length * width;
}
Note: The above questions will be asked from students as replacement of the marks of
Practical Notebook and Viva Voce. The rest of the conduct/format of practical
examination will continue as per practice in vogue.
Page 2 of 2