Programming in C MCQ - I/O Operations

Correct AnswerOption C
Rate difficulty Rate difficulty:
Choose a difficulty.

263 in binary form is 100000111. If one tries to print an integer as a character, only the last 8 bits will be considered - the rest chopped off. So, in this case, the ASCII value of 00000111 will be printed, Look in the ASCII table. It is ringing a bell!
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.
Implicit type conversion is performed automatically by the compiler according to the language conversion rules. An explicit conversion, or cast, is written by the programmer to request a particular type conversion.
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.
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.
Found this useful?
Follow:

If y = 11, the expression 3 * (y - 8) / 9 becomes 3 * 3 / 9. Which evaluates to 1.
But the expression ( y - 8 )/ 9 * 3 becomes 3 / 9 * 3. Which evaluates to 0 (since 3 / 9 is 0)
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.

y * = 2 means y = y * 2 i.e. y = 4, in this problem.
So, the expression is equivalent to x = 4 + 4, which is 8.
So, 8 will be printed.
However, the order in which the operands are evaluated is implementation-dependent.
If the right operand is evaluated first, the result will be 6.
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