Programming in C MCQ - Operators and Expressions

Correct AnswerOption D
Rate difficulty Rate difficulty:
Choose a difficulty.
The remainder operator (%) requires integer operands in C. The addition, multiplication, and division operators can also operate on floating-point values. Therefore, option D is correct.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *

Correct AnswerOption D
Rate difficulty Rate difficulty:
Choose a difficulty.
Found this useful?
Follow:
The logical OR operator evaluates its right operand only when the left operand compares equal to zero (false). If the left operand is true, evaluation of the right operand is skipped. Therefore, option C is correct.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *

Correct AnswerOption D
Rate difficulty Rate difficulty:
Choose a difficulty.
The addition, subtraction, and bitwise AND operators associate from left to right. Thus, repeated uses at the same precedence level group from the left unless parentheses specify otherwise. Therefore, option D is correct.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *

Correct AnswerOption D
Rate difficulty Rate difficulty:
Choose a difficulty.
The conditional operator (?:), compound assignment operators such as +=, and the assignment operator (=) associate from right to left. Therefore, option D is correct.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *

Correct AnswerOption C
Rate difficulty Rate difficulty:
Choose a difficulty.
In ascending order of precedence, the comma operator has the lowest precedence, followed by assignment, logical OR, and bitwise AND. Thus the correct order is comma, assignment, logical OR, and bitwise AND. Therefore, option C is correct.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *

Why Practice with Avatto?
High Quality MCQsExam-focused questions with accurate answers
Detailed ExplanationsStep-by-step explanations to enhance learning
Latest Exam PatternBased on updated syllabus and pattern
Performance AnalyticsTrack performance and improve weak areas
100% Free PracticePractice unlimited questions for free