0% found this document useful (0 votes)
6 views6 pages

PBA Pre-Board

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views6 pages

PBA Pre-Board

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

FAZAIA MODEL INTER

COLLEGE MUSHAF

ModelQuestionsPaperComputerScienceSSC-II Practical
Based Assessment (PBA) (2025)
TotalMarks:20 Time:45 minutes

Instructionsforstudents:

1. Fillalltheentriesincludingrollnumber.
2. Carefullyreadallthequestionsandthenanswerthemattheirspecified
spaces.
3. Useblackorblueball point.
4. Noadditionalmaterialorcalculatorisrequired.
5. Marksarementionedagainstallquestionsinthebrackets[].
6. Studentsmayusethelastpageforroughwork(ifrequired).
SectionA(12 marks)
QuestionNo. 1 [Marks:06]
i. Rearrange the lines in the correct order, such that the program should displaythe sum of even
numbersupto certain limit entered by a user. [2marks]

printf("\nSum of even numbers:


%d\n", sum);
void main(void) {
scanf("%d", &n);
#include <stdio.h>
printf("Enter the limit: ");
for (int i = 1; i<= n; i++) {
printf("Even numbers: ");
int n, sum = 0;
if (i % 2 == 0) {
sum += i;
}
}
printf("%d ", i);

ii. Converttheaboveforloop toawhileloopsuch that theoutput remains same. [3marks]

iii. Writedown theoutputof theaboveprogramsegment when n=20. [1 mark]


QuestionNo.2 [Marks:06]
WriteaCprogramtodetermine grades according to marks.
Requirements:

i. Input: [2 marks]

 The program should prompt the user to enter marks (floating-point or integer values).

ii. Processing: [3 marks]

 The program should determine the grade based on the given conditions:
o Marks between 80-100 → Grade A
o Marks between 70-80 → Grade B
o Marks between 60-70 → Grade C
o Marks between 40-60 → Grade D
o Marks less than 40 → Grade F
o Otherwise → Incorrect Percentage

iii. Output: [1 mark]


 The program should display the appropriate grade based on the input marks.
SectionB
Question No. 3 [Marks:8]
i. CorrectthefollowingHTMLcodebyremoving errors: [3marks]
<html> CorrectedHTMLCode:
<head>
<title>HTML Tables</title>
</body>
<h1>Tables in HTML</h1>
<h2>Student Grades</h1>
<table border="1" width=
100%>
<tr>
<th>Name
<th>Grade</th>
<tr>
<tr>
<td>John</td>
<td>A</td>
</tr>
<tr>
<td>Emily</th>
<td>B</td>
</tr>
<td>Michael</td>
<td>C</td>
</tr>
</table>
</body>
</html>

ii. Writedown thetagtoaddthe image link in the page after the table. [1mark]

iii. Writedown theoutput ofthe aboveHTMLcodeafter correctingthecode: [4marks]

You might also like