Skip to main content

Posts

Showing posts with the label Data Types and Qualifiers in C

Data Types and Qualifiers in C

There are four data types in C language. They are, Types Data Types   Basic data types   int, char, float, double   Enumeration data type   enum   Derived data type   pointer, array, structure, union   Void data type   void Here we will discuss only basic data types. Each variable in C has an associated data type. Each data type requires different amounts of memory and has some specific operations which can be performed over it. Let us briefly describe them one by one:   Following are the examples of some very common primitive data types used in C:   char: The most basic data type in C. It stores a single character and requires a single byte of memory in almost all compilers. int: As the name suggests, an int variable is used to store an integer. float: It is used to store decimal numbers (numbers with floating point value) with single precision. double: It is used to store decimal numbers (numbers with floating point value) with double pr