Share
I want to known what is data type and various data type in c programming language for (2+6) marks .
In progress
Programming, C
16 Mar 2025
4 views
Answers ( 1 )
A data type specifies the type of data in which a variable can store such as integer , character ,float and double . It determines the size, range, and operations that can be performed on the data. Data types are essential for memory allocation and ensuring that the program handles data correctly.
There are various data type used in c programming some of them are mention below :Used to store whole numbers (positive, negative, or zero). The appropriate data type is used according to our requirement i.e what type of number is to be used .
2. Floating-Point Types
Used to store decimal numbers. Floating number reserved 32 bit of storage , with 6 digit of precision .
Character Type
Used to store single characters. The sign char has values from 128 to 127. The conversion character for this type is C.
Void Type
Used to indicate the absence of a value.It is usually used to specifies a type of function when it does not return any value to the calling function.
Size and Range: The size and range of data types may vary depending on the system architecture (e.g., 32-bit vs. 64-bit systems).
Modifiers : Data types can be modified using keywords like signed, unsigned, short, and long to change their range and size.
Memory Efficiency : Choosing the right data type helps optimize memory usage and improve program performance.
By understanding these basic data types, you can effectively declare variables and manipulate data in C programming.