If you have any query feel free to chat us!
Happy Coding! Happy Learning!
In C, data types are used to specify the type of a variable or constant and the size of memory that will be allocated to it. C has several built-in data types, which can be broadly categorized as:
Integer types: These include types such as int, short, and long, which are used to store whole numbers. They can be signed (able to store negative values) or unsigned (only positive values).
Floating-point types: These include types such as float and double, which are used to store numbers with decimal places. They are used for real numbers, not only integers.
Character types: This includes the char data type, which is used to store individual characters, such as letters and symbols.
Boolean types: This includes the _Bool data type, which is used to store Boolean values, true or false.
Derived types: These include pointers, arrays, and structures, which are derived from the basic data types and provide additional functionality and features.
It's important to note that the size and range of values that can be stored by a variable of a particular data type may vary depending on the specific implementation and the platform on which the program is running. Additionally, C allows the use of type modifiers such as short, long and unsigned to modify the data type and increase or decrease the size of the variable.
Comments: 0