You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: LearningC/C_Language_Shorts/C_syntax.md
+17-17Lines changed: 17 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,6 +52,23 @@ You can only use variables you previously declared (or included from other files
52
52
> - int32_t : signed 32 bit
53
53
>
54
54
55
+
<details>
56
+
<summary> More on type "int" </summary>
57
+
Check man stdint.h
58
+
59
+
Integers can be prefixed with _unsigned_
60
+
- As an example take _char_ which is 8 bit long, 2^8 = 256 values
61
+
- char is from -128 to 127 [ -(2^8) /2 ; ((2^8) /2)-1 ]
62
+
- unsigned char from 0 to 255 [ 0 ; (2^8)-1 ]
63
+
64
+
Integers can be:
65
+
- long (l)
66
+
- unsigned long (ul)
67
+
- long long (ll)
68
+
- unsigned long long (ull)
69
+
If you want to know how many bits they are, you can call the _sizeof() function_
70
+
</details>
71
+
55
72
### Arrays
56
73
Records of homogenous data. Technically it's like a **list**\
57
74
The classic example would be **char\* argv[]**\
@@ -73,23 +90,6 @@ banaba bigNum = 1329:
73
90
### Other/Any
74
91
void: no variable/value
75
92
76
-
<details>
77
-
<summary> More on type "int" </summary>
78
-
Check man stdint.h
79
-
80
-
Integers can be prefixed with _unsigned_
81
-
- As an example take _char_ which is 8 bit long, 2^8 = 256 values
82
-
- char is from -128 to 127 [ -(2^8) /2 ; ((2^8) /2)-1 ]
83
-
- unsigned char from 0 to 255 [ 0 ; (2^8)-1 ]
84
-
85
-
Integers can be:
86
-
- long (l)
87
-
- unsigned long (ul)
88
-
- long long (ll)
89
-
- unsigned long long (ull)
90
-
If you want to know how many bits they are, you can call the _sizeof() function_
91
-
</details>
92
-
93
93
## Functions
94
94
Functions have a **prototype** which defines parameters and return value.
95
95
When you want to create a function you put the prototype at the beginning of the [source file](C_Files.md#source) or in the [header file](C_Files.md#header)
0 commit comments