Comp
Comp
ISLAMABAD
PRE BOARD EXAMINATION 2023
COMPUTER SCIENCE SSC–II
SUBJECTIVE PAPER
Note: Answer any nine parts from Section ‘B’ and attempt any two
questions from Section ‘C’ on the separately provided answer
book. Write your answers neatly and legibly.
________________________________________________________
SECTION – B (Marks 27)
Q1: Attempt any NINE parts from the following. All parts carry equal marks.
(9 3 = 27)
1. Write 2 advantages and 1 disadvantage of a compiler?
2. Convert the following for loop into while loop:
For ( a= 1; a<= 10; a++ )
Printf( “ \n %d”, a);
3. Write an algorithm that input marks and print the message “PASS” or “FAIL”.
Passing marks criteria is 40.
4. Evaluate each of the following expression assuming,
a = 5, z = 1.5, c = 2 and d = 3.3
a. b = a % z % d;
b. x = (a + c)/(z + 0.3);
c. y = c / d * a;
5. What is the difference between constant 123 and “ 123”
6. What is meant by variable initialization?
7. Construct Truth Table for the following Boolean Expression:
F= abc + abc + ab
8. Differentiate between Switch statement and if else if statement?
9. Write a program that input 2 numbers and find larger number using conditional
operator?
10. What will be the output of the following code?
#include<stdio.h>
void main()
{
int x,y,z1,z2,z3,z4;
x= 25;
y= 3;
Z1=x/y;
Printf("\n z1=%d", z1);
z2= x%y;
Printf("\n z2=%d", z2);
Z3=++x;
Printf("\n z3=%d", z3);
Z4=y++;
Printf("\n z4=%d", z4)
}
11.Use appropriate text formatting tags to define the following. write one example
for each.
Font size
Font color
Font face
12. What is meant by type casting. Differentiate between implicit type casting and
explicit type casting
13. What is the difference between # define and # include?
---------------------------------------------------------------------------------------
Best of luck
BAHRIA COLLEGE ZAFAR CAMPUS E-8
ISLAMABAD
PRE BOARD EXAMINATION’2023
COMPUTER SCIENCE SSC–II
OBJECTIVE PAPER
SECTION – A (Marks 12)
Time allowed: 15 mints
Q1: Fill the relevant bubble in each part. Each part carry one mark.
A:
B:
C:
D:
A: scanf( )
B: gets( )
C: get char( )
D: getche ( )
A. k+=a
B. k=+a
C. k++a
D. k= a++
5. What is the output of the following statement where value of a= 65?
A: 65 = A
B: 65 = 65
C: A = 65
D: a = a
6. How many times “Bahria College zafar campus” will be displayed by the
following code.
A: not run
int a; B: 1
for( a=1; a<10 ; a=+2) C: 5
printf( “Bahria College zafar campus”); D: infinite
B B
A 1
A 1 1
A: A + B
B: A + B
C: AB
D: A + B
8. Which of the following is the right option for the logical circuit:
A: AB + AB
B: AB + AB
C: AB
D: A + B
A: NAND
B: NOR
C: Exclusive OR
D: Exclusive NOR
10. What is the output of the following HTML code?
<ol>
<li> Hard Disk </li>
<li> CD and DVD </li>
</ol>
A: 1. Hard Disk
2. CD and DVD
B: Hard Disk
. CD and DVD
C: 1. Hard Disk
0. CD and DVD
D: Hard Disk
CD and DVD
11. Which of the following is correct HTML statement to divide browser windows
into three columns?
A: ++
B: +
C: !
D: _ _
____________________________________________________________________
Best of luck