Programming in C MCQ - Operators and Expressions

Correct AnswerOption D
Rate difficulty Rate difficulty:
Choose a difficulty.
The address-of operator cannot be applied to an object declared register. The register keyword also does not guarantee that the compiler will allocate a CPU register. Therefore, statements A and C are correct, making option D the correct answer.
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.
The declaration int *a; is valid C syntax. It declares a as a pointer to int. The declaration does not initialize the pointer, so its value must not be used before a valid pointer value is assigned. 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.

First from the truth table of the exclusive OR operation. If both the switches are off i-e 0, 0 then the light will be off i-e, 0. So, 0, 0 yields 0. If you switch on either of the two switches i-e. 0 1 or 1 0, the light will be on. So, 0 1 yields 1 (so does 1 0 ). Now, if you switch on the other one, which is currently off, it will be 1 1. This should yield a 0. Compare these results with the truth table of XOR.
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