47.0k views
2 votes
Explain all data type in c language

2 Answers

5 votes

Answer:

In C programming language, there are several built-in data types that you can use to store values in your program. These data types can be grouped into four categories:

  1. Character data types: These data types are used to store character values. There are two character data types in C: 'char' and 'wchar_t'. 'char' is used to store a single character, while 'wchar_t' is used to store wide characters (characters that take up more than one byte).
  2. Integer data types: These data types are used to store integer values (whole numbers). There are several integer data types in C, including 'short', 'int', 'long', and 'long long'. The size of the integer data type determines how much memory is allocated to store the value and how large of a number it can represent.
  3. Floating point data types: These data types are used to store decimal values. There are two floating point data types in C: 'float' and 'double'. 'float' is a single-precision floating point data type, which means it stores a decimal value with about 7 digits of precision. 'double' is a double-precision floating point data type, which means it stores a decimal value with about 15 digits of precision.
  4. Derived data types: These data types are derived from the built-in data types and include arrays, pointers, and structures. Arrays allow you to store multiple values in a single variable. Pointers allow you to store the address of a variable. Structures allow you to group related variables together in a single data type.

There are also additional data types available in C, such as 'void' and 'enum', that have specific purposes and uses in the language.

User Ruchika
by
7.3k points
1 vote

Answer: Floating-point, integer, double, character. Derived Data Type. Union, structure, array, etc.

Step-by-step explanation:

User Klimpond
by
7.6k points