Question:

Which of the following is primitive data type in C ?

Show Hint

Primitive = Built-in (int, float, char). User-defined = You build them (struct, union, enum).
Updated On: Aug 6, 2026
  • long int
  • struct
  • union
  • enum
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is A

Solution and Explanation

Concept:
• Data types in C are categorized into:
Primitive/Primary/Basic types: Built-in types that represent single values (e.g., int, char, float, double).
Derived types: Types derived from primitives (e.g., arrays, pointers).
User-Defined/Constructed types: Types created by the programmer (e.g., struct, union, enum).

Step 1:
Analyze the fundamental types in C
Primitive types are the atomic building blocks of the language. "int" is a primitive type. "long" is a type modifier that, when applied to "int", creates "long int". In C, the set of integer types (including short, long, signed, unsigned variations) are considered primary or primitive data types because they are supported directly by the hardware and the compiler's basic logic.

Step 2:
Evaluate User-defined types

struct (Option B): A structure is a container that holds variables of different types. It is defined by the user.
union (Option C): Similar to a struct but all members share the same memory location. Defined by the user.
enum (Option D): An enumeration is a user-defined type consisting of a set of named integer constants.

Step 3:
Conclusion
Since "long int" is a built-in numeric type provided by the C standard to handle larger integer values, it is the only primitive type among the choices.
Was this answer helpful?
0
0

Top CUET PG Data Science A.I Cyber Security and Computer Sci. Questions

View More Questions

Top CUET PG Programming and Data Structures Questions

View More Questions