Page 82 - CA_Blue( J )_Class9
P. 82
}
}
(i) What will be the output of the program?
a. Sum: 15, Difference: 5, Product: 50, Quotient: 2, Remainder: 0
b. Sum: 15, Difference: 5, Product: 50, Quotient: 2, Remainder: 5
c. Sum: 15, Difference: 5, Product: 50, Quotient: 1, Remainder: 0
d. Sum: 10, Difference: 5, Product: 50, Quotient: 2, Remainder: 1
Ans. a. Sum: 15, Difference: 5, Product: 50, Quotient: 2, Remainder: 0
(ii) How many operators’ types are used here?
a. 2 types b. 3 Types
c. 1 Type d. None of these
Ans. a. 2 Types (Arithmetic and Assignment)
E. Assertion and Reasoning based questions.
The following questions consist of two statements – Assertion (A) and Reason (R). Answer these questions by selecting
the appropriate option given below:
a. Both A and R are true, and R is the correct explanation of A.
b. Both A and R are true, but R is not the correct explanation of A.
c. A is true, but R is false.
d. A is false, but R is true.
1. Assertion(A): In Java, a local variable must be initialized before it is used.
Reason(R): Local variables in Java are automatically initialized to default values.
Ans. c. Assertion (A) is true, but Reason (R) is false.
2. Assertion (A): Object-Oriented Programming (OOP) promotes better code reusability compared to Procedural
Oriented Programming (POP).
Reason (R): OOP allows the creation of classes that can be instantiated multiple times, enabling the reuse of code
with different objects.
Ans. a. Both A and R are true, and R is the correct explanation of A.
3. Assertion (A): Identifiers in Java can start with a letter, underscore, or dollar sign.
Reason (R): Identifiers in Java can contain special characters such as @, #, or !.
Ans. c. Assertion (A) is true, but Reason (R) is false.
Unsolved Questions
A. Tick ( ) the correct answer.
1. Number of alphabets used in java code is ………………….
a. 26 b. 32
c. 52 d. Both a and c
2. What is the default value of a boolean data type in Java?
a. true b. false
c. 0 d. null
3. What type of token is + in Java?
a. Keyword b. Literal
c. Operator d. Identifier
4. Java has a total of ………………… escape sequences.
a. seven b. five
c. eight d. twelve
80 Touchpad Computer Applications-IX

