Programming in C MCQ - Constants, Variables and Data Types

Correct AnswerOption D
Rate difficulty Rate difficulty:
Choose a difficulty.
The sizeof operator determines the storage size of a type or object in bytes. The sizes of fundamental types depend on the C implementation. The C standard guarantees certain minimum size relationships, such as sizeof(char) being 1 and sizeof(short) not exceeding sizeof(int), but it does not require int and unsigned int to have different sizes. Therefore, comparisons involving type sizes must be interpreted according to the actual expressions and the C standard.
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.
Share this question
Share:

Coercion is 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 C
Rate difficulty Rate difficulty:
Choose a difficulty.

Strictly speaking, it will have a garbage value. Some implementations initialize to 0 on declaration.
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.
An identifier is a name used for a variable, function, array, structure, or other program entity. In C, an identifier may begin with an underscore or an alphabetic character. Subsequent characters may include letters, digits, and underscores. Some identifiers beginning with underscores are reserved for the implementation, so programmers should avoid reserved naming patterns.
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.
An external variable is declared outside a function and normally has static storage duration. A declaration using extern can refer to a variable defined elsewhere without allocating a separate object. External variables may be accessed from different functions or source files when their declarations and linkage permit it. Excessive use of external variables can make programs harder to maintain and debug.
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