Programming in C MCQ - Operators and Expressions

Correct AnswerOption D
Rate difficulty Rate difficulty:
Choose a difficulty.
Given i = 1, j = 2, and k = 3, the expression ((j + k) > (i + 5)) becomes (5 > 6). This comparison is false, so C evaluates it to 0. 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.
A left shift by six bit positions multiplies an unsigned value by 64 when the result is representable. With a 32-bit unsigned int, 0x6DB7U << 6 produces 0x1B6DC0. 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 C
Rate difficulty Rate difficulty:
Choose a difficulty.
Share this question
Share:

5-2-3*5-2 will yield 18, id it is treated as (5-(2-3))*(5-2). i.e., if - has precedence over* and if it associates from the right
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.

Coercion is the automatic conversion between compatible types and it is done by compiler.
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.
In C, integer constant expressions can be evaluated during translation, adjacent string literals are concatenated during translation, and an array definition with a fixed bound normally requires a determinable size. In the intended introductory context, all three statements are correct, so option D is selected.
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