0% found this document useful (0 votes)
11 views1 page

10th Computer Ch4 2nd Half

This document outlines the exam details for a 10th-grade computer science paper at Bab-ul-Ilm Academy, including the syllabus, exam date, and structure. It contains multiple-choice questions, short answer questions, and detailed programming tasks related to loops and arrays in C language. The exam is designed to assess students' understanding of programming concepts and their ability to write code.

Uploaded by

haseebahmad5479
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)
11 views1 page

10th Computer Ch4 2nd Half

This document outlines the exam details for a 10th-grade computer science paper at Bab-ul-Ilm Academy, including the syllabus, exam date, and structure. It contains multiple-choice questions, short answer questions, and detailed programming tasks related to loops and arrays in C language. The exam is designed to assess students' understanding of programming concepts and their ability to write code.

Uploaded by

haseebahmad5479
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/ 1

BAB-UL-ILM ACADEMY (SCIENCE & COMMERCE)

MAIN SUI GAS ROAD NEAR NADRA OFFICE SHARAQPUR KHURD KOT ABDUL MALIK
Student Name Roll Num Class Name Paper Code

10TH

Subject Name Time Allowed Total Marks Exam Date

Computer 30

Exam Syllabus

CHAP 4 (2nd half)

Q1. Choose the correct answer. 1X6=6

1. How many times the word "PAKISTAN" will be printed through the loop? (A) 5 (B) 4 (C) 3 (D) 1
for(int a = 0 ; a < = 3 ; a + +)
{
printf("PAKISTAN");
}
2. Loop within a loop is called ...... (A) For loop (B) While loop (C) (D) Nested loop
do while loop

3. Using loops, we can easily take ...... in arrays. (A) output (B) input (C) variable (D) constant

4. We can use if structures inside ...... structure in any imaginable (A) if (B) if else (C) if else if (D) loop
manners.
5. Always make sure that the ...... becomes false at some point. (A) Loop (B) Condition (C) Variable (D) Constant

6. C language provides ...... kind of loop structure. (A) 3 (B) 4 (C) 5 (D) 6

Q2. Write short answers of the following questions. 2X7=14

I . Define nested loop structure. II . Write a program that displays the table of 2.
III . Identify the errors in the following code segment. IV . Write general syntax of nested loop.
int count = 0;
for(inti = 4; i<6; i--)
for(int j = i, j < 45; j++)
{
count++;
printf("%count", count);
}
V . Write down output of the following code segment. VI . Write a program that assigns first 5 multiples of 23 to an array of size
for (int 1 = 50; i<= 50; i++) 5.
{
for(j = i; j >= 48; j--)
printf("j = %d \n", j);
printf("i = %d\n", i);
}
VII . Write a program to display the following pattern of stars on screen.
*
**
***
****
*****
******

Q3. Write detailed answers of the following questions. 5X2=10

1. Write a program that calculates the factorial of a number input by user. 2. Write a program to display prime numbers ranging from 2 to 100.

You might also like