Computer Science Model Paper X (Paper I)
Computer Science Model Paper X (Paper I)
CLASS X
y
nl
O
ar 3
ng
Le 02
ni
in ap B
& r2
ch l P -E
g e
ea de KU
r T Mo A
INSTRUCTIONS
2. Answer the questions on the separate answer sheet provided. DO NOT write your answers on the
question paper.
fo
3. There are 100 answer numbers on the answer sheet. Use answer numbers 1 to 40 only.
4. In each question, there are four choices A, B, C, D. Choose ONE. On the answer grid, black
out the circle for your choice with a pencil as shown below.
Candidate’s Signature
5. If you want to change your answer, ERASE the first answer completely with a rubber, before
blacking out a new circle.
6. DO NOT write anything in the answer grid. The computer only records what is in the boxes.
1. The three MOST appropriate factors in analysing the efficiency of an algorithm are
START
READ A
y
nl
O
B=1
ar 3
ng
Le 02
C=1
ni
in ap B
& r2
ch l P -E
g e
ea de KU
C=C*B
r T Mo A
C=C+1 A=C
No
Yes
PRINT C
fo
STOP
If the input value is 3, then the output value of the flowchart will be
A. 1
B. 2
C. 3
D. 6
3. In problem solving process, the step that comes after defining the problem is
A B
Step 1: Start Step 1: Start
Step 2: K = 60 MOD 7 Step 2: K = 50 MOD 3
y
nl
Step 3: Output K * 5 Step 3: Output K * 5
O
Step 4: Stop Step 4: Stop
ar 3
ng
Le 02
C D
ni
in ap B
& r2
ch l P -E
g e
5. Consider the given algorithm.
ea de KU
Step 1: Start
r T Mo A
Step 2: INPUT W
Step 3: X = 2, Y = 3
Step 4: X = X * Y
Step 5: Y = X + Y
Step 6: PRINT Pakistan
fo
If the input is 50, then the number of times the word Pakistan is printed will be
A. 2
B. 3
C. 4
D. 6
A. input symbol.
B. output symbol.
C. process symbol.
D. decision symbol.
7. C programming allows a program to run in an operating system that is different from the one
it was created in.
A. portable language.
B. structured language.
C. middle-level language.
D. compiler-based language.
8. A program outputs the word Hello upon its execution. The minimum number of functions that
must be used in this program is
y
A. one.
nl
B. two.
O
C. three.
ar 3
ng
D. four.
Le 02
ni
in ap B
9. & r2
Which of the following options shows the CORRECT features of machine language?
ch l P -E
g e
ea de KU
C D
10. When a program file named as FirstProgram is compiled, it has different extensions at
different stages of the compilation process.
The CORRECT sequence of processing of the file, on the basis of extensions, at different
stages is
11. The data type that should be used to store the home address of a person is
A. char.
B. long.
C. float.
D. double.
A. machine language.
B. assembly language.
C. procedural language.
D. object-oriented language.
A. compiling.
B. debugging.
C. assembling.
D. interpreting.
y
nl
14. The following code is written to output the phrase Break the Ice but it contains some error(s).
O
ar 3
ng
#include <stdio.h>
Le 02
int main( )
ni
in ap B
{ & r2
ch l P -E
return 0
}
r T Mo A
A. one.
B. two.
C. three.
D. four.
fo
#include <stdio.h>
int main(void)
{
int x, y;
float z;
x = 3.2; x = 3.3;
y = 3.2; y = 3.1;
z = 3.2; z = 3.2;
y
printf("%.2f", x + y + z); printf("%.2f", x + y + z);
nl
} }
O
ar 3
A B
ng
Le 02
x = 3.1; x = 3.4;
ni
in ap B
y = 3.1; & r2 y = 3.5;
ch l P -E
z = 3.4; z = 3.6;
g e
ea de KU
C D
fo
#include <stdio.h>
int main(void)
{
int A, W, L = 0;
y
scanf("%.1f %.1f", W, L);
nl
A=W*L;
O
printf("Result = %.1f", A);
ar 3
ng
return 0;
Le 02
}
ni
in ap B
& r2
ch l P -E
The code that should replace the shaded segment of the program to make it error free is
g e
ea de KU
A=W*L; A=W*L;
printf("Result = %d", A); printf("Result = %.1f", A);
A B
scanf("%d %d", &W, &L); scanf("%.1f %.1f", W, L);
A=W*L; A=W*L;
printf("Result = %d", A); printf("Result = %.1f", A);
fo
C D
#include<stdio.h>
int main(void)
{
printf("Hello\nWorld");
return 0;
}
"Hello\nWorld" Hello\nWorld
A B
Hello Hello
World /nWorld
C D
int X = 9/2;
Upon execution of the statement, which of the following values will be stored in X?
A. 0
B. 4
C. 4.5
D. 5
20. Which of the given programs will give the output Z on the screen?
y
#include <stdio.h> #include <stdio.h>
nl
void main(void) void main(void)
O
{ {
ar 3
ng
putchar("XYZ"); putchar('XYZ');
Le 02
} }
ni
in ap B
A & r2 B
ch l P -E
g e
#include <stdio.h> #include <stdio.h>
ea de KU
{ {
puts("XYZ"); puts('XYZ');
} }
C D
#include <stdio.h>
void main()
{
float a = 1244.6713877;
printf("%.4f\n", a);
}
A. 1244.67138e+02
B. 1.244671e+03
C. 1244.671387
D. 1244.6714
#include<stdio.h>
void main( )
{
int a = 5;
int b = 10;
if(a < 5 || b > 10)
printf("%d", a * b);
else
printf("%d", b / a);
}
y
The output of the given code is
nl
O
A. 2
ar 3
ng
Le 02
B. 5
C. 10
ni
in ap B
D. 50 & r2
ch l P -E
g e
ea de KU
A. For loop
B. If-else statement
C. Format specifier
D. Pre-processor directive
24. If the switch variable does not match any of the case constants in switch statement, then the
control goes to the
fo
A. if keyword.
B. else keyword.
C. break keyword.
D. default keyword.
#include <stdio.h>
int main(void)
{
int x, y, z = 0;
for(y =1; y <= 4; y++)
{
scanf("%d", &x);
if( (x + 3) % 5 == 0)
z = z + x;
}
printf("result = %d", z);
y
return 0;
nl
}
O
ar 3
ng
If the input of the program is the given four numbers, i.e. 4, 5, 6, 7, then the output will be
Le 02
ni
A. 0
in ap B
B. 5 & r2
ch l P -E
g e
C. 7
ea de KU
D. 10
r T Mo A
#include<stdio.h>
int main( )
{
int j = 1;
int k = 3;
fo
while(j < k)
{
k = k + 2;
printf("\nIslamabad");
j = j + 3;
}
return 0;
}
If the given program is executed, then the number of times Islamabad is printed on the
screen will be
A. one.
B. two.
C. three.
D. four.
A. Do While loop
B. Switch statement
C. Escape sequence
D. Pre-processor directive
A. Two
B. Three
C. Four
D. Five
y
nl
Use the given program to answer Q.29 and Q.30.
O
ar 3
ng
#include <stdio.h>
Le 02
int main() {
ni
in ap B
int n; & r2
ch l P -E
{
printf("%d ", n);
r T Mo A
}
return 0;
}
29. The output of the program is
A. 1 2 3 4 5 6 7 8 9 10
B. 10 9 8 7 6 5 4 3 2 1
fo
C. 2 3 4 5 6 7 8 9 10
D. 10 9 8 7 6 5 4 3 2
30. Which of the following loop statements should be used in the program to repeat the code three
times inside the loop body?
#include <stdio.h>
int main()
{
int n = 10, i;
for (i = 1; i <= n; ++i)
{
printf("Vision\n");
}
return 0;
}
y
After the given loop condition becomes false, the value of variable i is
nl
O
A. 1
ar 3
ng
Le 02
B. 9
C. 10
ni
in ap B
D. 11 & r2
ch l P -E
g e
ea de KU
+5 V
0V
A. 01101010010
B. 10010101101
C. 01010101010
D. 01001010110
J
K
X
L
M
J K L M
y
A 1 1 1 1
nl
O
B 1 0 0 1
ar 3
ng
Le 02
C 1 1 1 0
ni
in ap B
D 0 0 & r2
0 0
ch l P -E
g e
ea de KU
B B
A 1 1
A 1
A. A+B
B. A +B
C. B+ B
D. A+ B
The MS Excel formula that will add the values of cells A1, A2, A3, A4, A5 and B2, giving the
result of 81, is
y
nl
A. =ADD(A1:A5:B2)
O
B. =ADD(A1:A5,B2)
ar 3
C. =SUM(A1:A5:B2)
ng
Le 02
D. =SUM(A1:A5,B2)
ni
in ap B
& r2
ch l P -E
36. Shazia, a class teacher, has the following data representing the ages (in years) of 7 students in
g e
her class.
ea de KU
r T Mo A
fo
The MS Excel formula, with appropriate cell range, to calculate the number of students whose
age is 14 years will be
A. =COUNTIF("=14",A1:A7)
B. =COUNTIF(=14,"A1:A7")
C. =COUNTIF(A1:A7:"=14")
D. =COUNTIF(A1:A7,"=14")
37. All of the following file formats can be opened in MS Excel EXCEPT
A. exe
B. html
C. xml
D. xlsx
END OF PAPER
Computer Science Model Paper X
Page 15 of 16
y
nl
O
Male Female Female Male
ar 3
ng
70 30 30 70
Le 02
ni
in ap B
A & r2
B
ch l P -E
g e
ea de KU
70 Male Female 30
30 Female Male 70
r T Mo A
C D
39. A program that enters through the weakness in the operating system of a computer is a/ an
A. virus.
B. worm.
fo
C. adware.
D. spyware.
40. Which of the following security measures ensures the receiver that the message is coming
from the intended sender and not a hacker?
A. Confidentiality
B. Authentication
C. Decryption
D. Encryption