Class Ix Revision Worksheet 1
Class Ix Revision Worksheet 1
25. _______________ is the technique of binding both data and functions together to keep them safe
from unauthorised access and misuse.
e. Abstraction
f. Encapsulation
g. Inheritance
h. Polymorphism
26. The ability of a function or object to take on multiple forms is called:
i. Abstraction
j. Encapsulation
k. Inheritance
l. Polymorphism
43. What will be the data type of variable x in the expression x=a>b?
a. long
b. boolean
c. int
d. char
44. If a = 3 and b = 7, what will be the value of p in the expression p = (a + 4 < 7 )? ‘F’: ‘T’
e. F
f. T
g. false
h. true
45. What will be the output of the expression a++%6, if initially the value of a is 4?
i. 0
j. 1
k. 4
l. 5
46. Which of the following is a unary operator?
m. %
n. >
o. /
p. ++
47. What will be the output of 45/7?
q. 6
r. 6.1
s. 6.12
t. 6.125
48. What will be the ASCII code of ‘f’ if the ASCII code of ‘F’ is 70?
u. 70
v. 75
w. 102
x. 202
49. If a user wants to execute a loop for 10 times, which of the following statements will be valid?
a) for( i = 6; i <= 26; i = i + 2)
b) for( i = 4; i <= 33; i = i + 3)
c) for( i = 0; i <= 10; i = i++)
d) for( i = 5; i <= 45; i = i + 4)