+97470301568>> buy weed in qatar,buy thc oil qatar,buy weed and vape oil in d...
Datatypes in C Language
1. Subject : CPU(2110003)
Topic – Datatypes in C Language
Branch : Electrical
Div – F Batch : F - 1
Prepared By : Parth Patel
Guided By : Prof. Raxit Jani
2. • "Data type can be defined as the type of data of
variable or constant store.“
• When we use a variable in a program then we
have to mention the type of data. This can be
handled using data type in C.
• Followings are the most commonly used data
types in C.
6. The void type has no values therefore we cannot
declare it as variable as we did in case of integer
and float.
The void data type is usually used with function to
specify its type.
7. Keyword
Format
Specifier
Size Data Range
char %c 1 Byte -128 to +127
unsigned char %c 1 Bytes 0 to 255
int %d 2 Bytes
-32768 to
+32767
long int %ld 4 Bytes -231
to +231
unsigned int %u 2 Bytes 0 to 65535
float %f 4 Bytes
-3.4e38
to
+3.4e38
double %lf 8 Bytes
-1.7e38
to
+1.7e38
long double %Lf 10Bytes
-3.4e38
to
+3.4e38
8. • C language supports a feature where user can
define an identifier that characterizes an existing
data type.
• This user defined data type identifier can later be
used to declare variables.
• In short its purpose is to redefine the name of an
existing data type.
10. Syntax-
enum identifier {value1,value2….valuen};
The identifier is a user defined enumerated
datatype which helps to declare variables that can
have one of the value enclosed in braces.This is
known as enumeration.