File tree Expand file tree Collapse file tree 1 file changed +37
-14
lines changed
LearningC/C_Language_Shorts Expand file tree Collapse file tree 1 file changed +37
-14
lines changed Original file line number Diff line number Diff line change 33C is a language with static strong typing,
44This means that you cannot change a variable's type or size once you've declared it.\
55You can only use variables you previously declared (or included from other files)
6+ ### Index
7+
8+ > [ Data Types] ( #variable-types )
9+ > > numbers \
10+ > > arrays \
11+ > > struct
12+ >
13+ > [ Functions] ( #functions ) \
14+ > [ Conditional Statements] ( #conditional )
15+ > > if / then / else \
16+ > > switch / case
17+ >
18+ > [ Loop Statements] ( #loop )
19+ > > while / do \
20+ > > for
21+ >
622
723## Variable Types
824
925### Numbers:
10- - bool ` #include <stdbool.h> `
11- - true or false
12- - char (signed/unsigned)
13- - 8-bit = 1 byte
14- - short (signed/unsigned)
15- - 2-byte
16- - integer (signed/unsigned)
17- - 4 8 16 byte depending on os/cpu
18- - long (signed/unsigned)
19- - longer integer. if you need more you can use _ long long_
20- - float
21- - real number
22- - double
23- - double precision real number
26+ > ** bool** ` #include <stdbool.h> ` :
27+ > > true or false
28+ >
29+ > ** char** (signed/unsigned):
30+ > > 8-bit = 1 byte
31+ >
32+ > ** short** (signed/unsigned):
33+ > > 2-byte
34+ >
35+ > ** integer** (signed/unsigned):
36+ > > 4 8 16 byte depending on os/cpu
37+ >
38+ > ** long** (signed/unsigned):
39+ > > longer integer. if you need more you can use _ long long_
40+ >
41+ > ** float** :
42+ > > real number (8-bit?)
43+ >
44+ > ** double** :
45+ > > double precision real number (16-bit?)
46+ >
2447
2548> [ !NOTE]
2649> For ** intergers** we specify the size explicitly when it matters:
You can’t perform that action at this time.
0 commit comments