You are on page 1of 1

THE EXCELLENT SCIENCE ACADEMY, CHINIOT

Test Series (10th Class)


Paper: Comp. Science Test Type: Total Marks : 50
Objective+Subjective
Chapter# 1 to 3 Obtained Marks
Name:
OBJECTIVE
NOTE: Write your Name in the space provided.Overwriting,cutting,erasing,using lead pencil will result in loss of marks.
Q. No. 1 Possible answers are given in each statement. Tick correct one. (10)

Sr.
Question Statement A B C D
No.
1 If Else is an example of _____ structure. Sequence Repetition Selection Loop

2 Conditional logic helps in___________. Decision Iteration Traversing All


In if else if there user can give ___
3 1 2 3 many
number of choices.
Include statements are written in ___ Main Link Body Html
4 section.
5 Which one is a valid statement: int=5 A=5 if=45 if=else
6 _____is a relational operator: + # == =
_______ is an one way decision making
7 If-else if if-else-if Sequence
statement.
A variable is a memory _______ in
8 Location Value Code program
computer.
9 There are ____ types of control structure. One Two Three Four
10 _________ is a keyword. else if int All

SUBJECTIVE
Q. No. 2 Give Short Answers of any fifteen (15) of Following: (30)

i. Define main function o0f C language. xi. Differentiate between if-else and if-else-if
ii. What is meant by term "identifier" ? statement.
iii. Draw flowchart of if else statement. xii. Define nested selection structure.
iv. Define condition with an example. xiii. What will be the output of following code:
v. Describe control statements. List down the int m=30;
names of control statements. if(m!=30)
vi. Write down syntax and example of if else printf("Not Equal");
statement. else
vii. Describe the purpose of modulus operator. printf("Equal");
viii. Highlight the working structure of selection xiv. Define the use of statement terminator.
statement? xv. What is compound statement?
ix. Write a C program that takes year as input and xvi. Draw flow chart of if statement.
display leap year if the year is a leap year. xvii. Find the error in the code:
x. What is if else if statement .Write down its if(x>==10);
syntax. printf('Good')
Long Question
Note: Attempt any one question from following.
Q.No 3 a) Define if statement. Explain its structure. Give an example of if statement. (6+4)
b) Write a C program that takes a number as input and display "YES" if the input number is multiple
of 3 and has 5 in unit's place.
Q.No 4 a) Write a detail note on : a) Short Circuit evaluation b) Precedence of operators. (4+6)
b) Write a C program that input the length of three sides of a triangle and tells whether it is a
right triangle or not. For a right triangle , hypotenuse2 = base2 + height2

You might also like