Programming in C MCQ - Pre-processor Directives

Correct AnswerOption D
Rate difficulty Rate difficulty:
Choose a difficulty.
The macro parameters are not enclosed in parentheses, so macro substitution produces sqrt(a+2*a+2 + b+3*b+3). By operator precedence, multiplication is evaluated before addition. The expression simplifies to sqrt(3*a + 4*b + 5). Therefore, option D is correct. A safer macro would parenthesize each parameter occurrence.
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