Introduction to Data types in C

 

  • C supports different types of data, each of which may be represented differently within a computer’s memory.
  • Data type is used to determine what type of value a variable or a constant can contain throughout the program.
  • Data types were already pre-defined and we have to choose one data type among all according to the size of the data and type of the data that what you are going to work with.
  • A data type is used to identify the type of a variable when the variable is declared, to identify the type of the return value of a function and to identify the type of a parameter expected by a function
  • In C language, it is compulsory to declare variables with their data type before using them in any statement.
  • Mainly data types are categorized into 3 categories:-
  1. Primitive Data Types
  2. Derived Data Types
  3. User Defined Data Types

 

Datatypes Classification in C

Datatypes Classification in C

Share this