Skip to content

Commit 106e3fe

Browse files
authored
Update C_syntax.md
1 parent 24c3da3 commit 106e3fe

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

LearningC/C_Language_Shorts/C_syntax.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,16 @@ You can only use variables you previously declared (or included from other files
3030
3131
>[!NOTE]
3232
> Use comments to document immediately
33+
> ```
34+
> if () // we use option 1
35+
> {
36+
> ...
37+
> }
38+
> else // default
39+
> {
40+
> ...
41+
> }//endif
42+
> ```
3343
3444
## Index
3545
@@ -158,7 +168,7 @@ union test{
158168
You can define your own types with **_typedef_**
159169
```
160170
typedef uint16_t banana;//0-65535
161-
banaba bigNum = 1329:
171+
banana bigNum = 1329:
162172
```
163173
164174
### Other/Any
@@ -174,7 +184,7 @@ pointer : an address in memory
174184
175185
### arithmetic
176186
```
177-
a <op> b, where <op> os one of:
187+
a <op> b, where <op> is one of:
178188
+ - * / % (modulo)
179189
```
180190
### assignment
@@ -194,13 +204,13 @@ a <op> b, where <op> os one of:
194204
```
195205
### unary
196206
```
197-
<op>a, where <op> os one of:
207+
<op>a, where <op> is one of:
198208
& * ~ -
199209
```
200210
201211
### incremental
202212
```
203-
<op>a or a<op>, where <op> os one of:
213+
<op>a or a<op>, where <op> is one of:
204214
++ (+=1) -- (-=1)
205215
```
206216
### accessing
@@ -215,15 +225,15 @@ A[i] where A is an array
215225
216226
### bitwise
217227
```
218-
a<op>b, where <op> os one of:
219-
& (and) | (or) ^ (Xor) ~ (not)
228+
a<op>b, where <op> is one of:
229+
& (and) | (or) ^ (xor) ~ (not)
220230
```
221231
These are extremely important for configuring µControllers,\
222232
Ther will be an exercise just for this topic
223233
224234
### logic
225235
```
226-
a<op>b, where <op> os one of:
236+
a<op>b, where <op> is one of:
227237
&& (and) || (or) ^ (xor) ! (not)
228238
```
229239
@@ -265,7 +275,7 @@ Conditional statements are only executed under certain conditions\
265275
> ***Conditions wear bras***
266276
> parenthesize
267277
268-
### if-then-else
278+
### if-else
269279
```
270280
if (condition1)
271281
{}

0 commit comments

Comments
 (0)