The Syntax for Defining a Data type is:
So, this is how you declare & define data types in your C program.
<Data Type> <Variable Name> , . . . . . . ;Declaration is done at the beginning of function :
Data Definition
|
Data type
|
Memory Defined
|
Size (bytes)
|
Value Assigned
|
char a, c;
|
char
|
a
c
|
1
1
|
-
-
|
char a=’Z’
|
char
|
a
|
1
|
Z
|
int a;
|
int
|
a
|
4
|
-
|
int a = 2;
|
int
|
a
|
4
|
2
|
float a;
|
float
|
a
|
4
|
-
|
float a = 2.3;
|
float
|
a
|
4
|
2.3
|
No comments:
Post a Comment