Page 74 - CA_Blue( J )_Class10
P. 74
B. Fill in the blanks.
1. The variables or values that are used in an expression are called ………………….
2. The symbols that perform calculations over the operands are known as ………………….
3. A ………………… operator contains three operands or expressions.
4. In ………………… increment operator, value of a variable is assigned and then increased by 1.
5. The ………………… increment operator is written before the operand.
6. Ternary operators are also known as ………………… operator.
7. There are ………………… types of relational operators in Java.
8. The ………………… operator is used to invoke members of a package.
Answers
1. Operands 2. Operators 3. Ternary 4. postfix 5. prefix
6. Conditional 7. six 8. dot(.)
C. Answer the following questions:
1. What is the difference between an operator and an operand?
Ans. Operator Operand
The symbols that perform calculations over the operand are The variables or values that are used in the expression are
called operators. called operands.
In an expression, a + b, "+" is an operator. In an expression, a + b, "a" and "b" are the operands.
2. What are Arithmetic statements? Give one example.
Ans. Arithmetic statements are a combination of operators and operands that provides us some sort of a result upon execution.
3. What are the three forms of operators?
Ans. The three forms of operators are:
a. Unary Operator
b. Binary Operator
c. Ternary Operator
4. Define arithmetic operators.
Ans. Arithmetic operators are used to perform simple and advanced mathematical operations on the values which are of primitive
data types. Example: +, -, etc.
5. Define arithmetic unary plus operator.
Ans. Arithmetic unary plus operator works with only one operand and the output is the same as the input. The result may be positive
or negative.
6. Define postfix decrement operator.
Ans. The postfix decrement operator is written after the operand. In case of the postfix decrement operator, the value is assigned first
and then decreased by 1.
7. Define Accumulator.
Ans. Accumulator is a variable whose mode of operation is similar to a counter, but the increment value is different for each recurrence
of the loop. Example: s=s+a;
8. Write the syntax of the ternary operator.
Ans. Result = (Condition)? Statement1 : Statement 2;
9. What is the output of the relational operator?
Ans. The output of the relational operator is in the boolean form either true or false.
10. What are the three types of logical operators?
Ans. There are three types of logical operators. They are && (AND), || (OR) and ! (NOT).
7272 Touchpad Computer Applications-X

