Types of Variables in C
In the C programming language, variables are used to store values that can be manipulated by the program. There are several different types of variables in C, including:
- int: This is a type of integer variable that can store whole numbers.
- float: This is a type of variable that can store decimal values
- double: This is a type of variable that can store larger decimal values than the float type.
- char: This is a type of variable that can store a single character, such as a letter or symbol.
- void: This is a special type of variable that does not have a value. It is often used in function declarations to indicate that the function does not return a value.
There are also several other types of variables in C, including long, short, and unsigned variables. In addition, C allows we to create our own custom types using the typedef keyword.
Leave a Comment