What is the type of C
What is C: C is a general-purpose programming language. It is used to developing operating systems UNIX, databases, etc. C was developed by Dennis Ritchie in the 1970s. It is a good programming language for the beginner.
Data type: Data types are defined as the data storage format that a variable that can store the data and perform a specific task or operation.
Type of C language: There are two types of C language
1. Primary data type: These are a fundamental primary data type that is Int, char, float, double.
Int data type: It allows a variable to store numeric values. “int” keyword is used for an integer variable.
Ex: int a = 1000;
Char data type: It allows a variable to store only one character. “char” keyword is used for the character variable.
Ex: char = ‘A’;
Float and double data type: Both are used for storing decimal values.
but double data type which allows up to 10 digits after the decimal.
2. Derived data type: Array, pointer, structure, and union are called derived data types in C.
Array: Array is a collection of similar data types. You can store a group of data of the same data type in an array.
Ex: int arr[10];
Pointer: pointer is a variable that stores the address of another variable. “*” this size is used for the pointer variable.
Ex: int *ptr;
If you learn more about related data type then visit this website :
Comments
Post a Comment