0% found this document useful (0 votes)
32 views2 pages

10th-Computer Science-Computer Half Book

This document is a half-book test for 10th-grade Computer Science students at Saad Academy. It includes multiple-choice questions, short answer questions, and detailed programming tasks related to C language concepts. The test covers topics such as operators, loops, arrays, and escape sequences, with a total of 50 marks available.

Uploaded by

Ayesha Abbas
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)
32 views2 pages

10th-Computer Science-Computer Half Book

This document is a half-book test for 10th-grade Computer Science students at Saad Academy. It includes multiple-choice questions, short answer questions, and detailed programming tasks related to C language concepts. The test covers topics such as operators, loops, arrays, and escape sequences, with a total of 50 marks available.

Uploaded by

Ayesha Abbas
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/ 2

Saad Academy

Ismail Park, Allied bank, Daroghawala, Lahore

Student Name: Class: 10th

Paper Type: Half Book Tests Subject: Computer Science

Paper Time: 1:45 hours Maximum Marks: 50

Q1. Choose the correct option. (10X1=10)


1. It is a very common mistake to forget ........ operator in the scanf function.
(A) & (B) % (C) * (D) $
2. What will be the output of code?
void main ()
{
printf ("2");
}
(A) 3 (B) 1 (C) 2 (D) 4
3. Among the following ............ operator has the lowest precedence.
(A) / (B) = (C) (D) !
4. Which symbol is used for logical AND operator?
(A) || (B) && (C) ! (D) #
5. If size of an array is 100, the range of indexes will be:
(A) 0-100 (B) 0-99 (C) 1-100 (D) 2-102
6. Which of the following is correct declaration of array?
(A) (B) (C) (D)
7. .......... structure allows repetition of a set of instructions.
(A) loop (B) conditional (C) control (D) data
8. .............. part of "For loop" is executed first.
(A) condition (B) body (C) initialization (D) increment/decrement
9. How many time "Punjab" will print by using the following statement?
for (a=0;a<=4;a++)
{
printf ("Punjab");
}
(A) 1 (B) 2 (C) 3 (D) 5
10. What is the type of parameter in this function int add (int x, int y)?
(A) int (B) char (C) area (D) float

Q2. Write down short answers of following questions. (4X2=8)


[i]‫ ـ‬Differentiate between "char" and "int". [ii]‫ ـ‬Describe the purpose of escape sequence with an example.
[iii]‫ ـ‬Solve this expression: 18/(15-3*2) [iv]‫ ـ‬Define binary operators

Q3. Write down short answers of following questions. (4X2=8)


[i]‫ ـ‬What will be the output of the following code: [ii]‫ ـ‬Declare an array of float type to store marks of five students.
{ [iii]‫ ـ‬What is the output of following code?
int a=7, b=10; int S=0;
a=a+b; for (int a =1;a<5; a++)
b=b-a; {
print f ("%d%d";a,b); S=S+a;
} printf ("Sun=%d",S);
}
[iv]‫ ـ‬How is loop used to write values in array?

Q4. Write down short answers of following questions. (4X2=8)


[i]‫ ـ‬How many types of loops are there in C language? Write down [ii]‫ ـ‬What is the output of following code?
their names. for (int a=0;a<4;a++)
printf ("Pakistan ");
[iii]‫ ـ‬What is the advantage of divide and conquer opproach? [iv]‫ ـ‬Find the errors in the following:
void sum (int a, int b);
{
return a+b;
}

Q5. Write detailed answers of the following questions. (6X4=24)


1. (a) Define operators. Explain any three arithmetic operators in C- language example.
(b) What is escape character? Describe an escape sequence used for new line with example.
2. (a) Write down a program to print odd number form 1-9 using "for" loop.
(b) Write a program using "for" loop to print table of any number.
3. (a) Write a program using "for Loop" to print Counting from 11 to 15.
(b) Write a program in C-Language that takes a number form user and prints table that numbers (using loop) on a screen.

You might also like