1.

What is the difference between ternary operators and unary operators?(a) Ternary Operators work with 1 operand while unary operators work with 3 operands(b) Ternary Operators work with 3 operands while unary operators work with 1 operand(c) Ternary Operators work with 2 operands while unary operators work with 3 operands(d) Ternary Operators work with 4 operands while unary operators work with 1 operandThis question was addressed to me in examination.This intriguing question comes from Operators topic in portion Arduino Programming of Arduino

Answer»

Right CHOICE is (B) Ternary Operators WORK with 3 operands while unary operators work with 1 operand

The explanation is: The term “ternary” depicts three and the term “unary” depicts the term one. So therefore, ternary operators need 3 operands and unary operators use 1 operand.

Eg:-



Discussion

No Comment Found

Related InterviewSolutions