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

Chapter 11 Paper

computer science 12th class chapter 11 paper

Uploaded by

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

Chapter 11 Paper

computer science 12th class chapter 11 paper

Uploaded by

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

Teacher Name: Muhammad Raees

Name: Total Marks: 75 Class: 2nd year ICS


Chapter No: 11 Paper: computer
Time Allowed: 10 Minutes
(OBJECTIVE PART)
Q No.1: Choose the correct answer. Max Marks:16*1=16
1) In if statement, false is represented by
a) 0 b) 1 c)2 d)3
2) When a relational expression is false, it has the value
a) Zero b) one b) less than 0 d) two
3) Which of the following is used for making two-way decision?
a) If-else b) if c) nested if d) switch
4) Another term for a computer making a decision is:
a) Sequential b) selection c) repetition d) incretion
5) Which programming structure makes a comparison:
a) Relational b) repetition c) sequence d) decision
6) Relational operators allow you to ___ numbers.
a) Add b) compare c) Multiply d) Divide
7) Which programming structure executes program statements in order?
a) Sequence b) repetition c) Decision d) Relation
8) Which of the following is equivalent to (p>=q)?
a) P<q b) ! (p<q) c) p>q d) ! p<q
9) The case block ends with:
a) End select b) end case c) break d) case else
10) Which keyword is not used in switch statements?
a) Default b) if c) case d) switch
11) An expression that uses a relational operator is known as
a) Serial Expression b) Arithmetic Expression c) Relational Expression d) sequential expression
12) Which is the simplest selection structure?
a) If b) switch c) if – else d) Nested – if
13) What operators are used to join two or more conditions?
a) Relational b) Logical c) Assignment d) Comparison
14) In if statement true is represented by:
a) 0 b) 1 c) 2 d) 3
15) Relational operators allow you to _______ number:
a) Compare b) add c) multiply d) divide
16) Which operator in C is called a ternary operator
a) If b) if then c) ++ d) ()

Time: 02:10 Hours SUBJECTIVE


Q.2 Write short answers of any six parts of the following. 6*3=18
1) Define control structure?
2) What happens if break is missed in case of block?
3) Define sequential structure? How instructions are executed in sequence structure?
4) Write the syntax of if-else statement?
5) Why a default label is used in switch statement?
6) Write output of the following code
Int p=3; int q=5;
If(p>q)
Printf(“%d”,p);
Else
Printf(“%d”,q);

Long Questions 28
1) Write a program that inputs a number and finds whether it is even or odd using if-else
structure?
2) Write a program that inputs a year and finds whether it is a leap year or not using if
else structure?
3) The following program inputs a character and displays whether it is a vowel or not?
4) Write a program that inputs a number from user and determines whether it is positive
negative or zero?

You might also like