Skip to content

Commit 30badbd

Browse files
authored
Update C_syntax.md
1 parent a74364d commit 30badbd

File tree

1 file changed

+22
-5
lines changed

1 file changed

+22
-5
lines changed

LearningC/C_Language_Shorts/C_syntax.md

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,26 @@ void: no variable/value
9494

9595
## Operators
9696

97-
### binary
97+
### arithmetic
9898
```
9999
a <op> b, where <op> os one of:
100-
+ - * / % (modulo) ^ (power)
100+
+ - * / % (modulo)
101+
```
102+
### assignment
103+
```
104+
= : a = b, assign value of b to a
105+
+= : a+=3 <=> a = a + 3;
106+
-= , *= , /= , ...
107+
```
108+
### comparison
109+
```
110+
== : is equal
111+
!= : is not equal
112+
<= : is less or equal
113+
=> : is greater or equal
114+
< : less
115+
> : more
101116
```
102-
103117
### unary
104118
```
105119
<op>a, where <op> os one of:
@@ -111,10 +125,13 @@ a <op> b, where <op> os one of:
111125
<op>a or a<op>, where <op> os one of:
112126
++ (+=1) -- (-=1)
113127
```
114-
### accessing
128+
### accessing
115129
```
116130
A.a where A is a struct
117-
returns elemement a
131+
returns elemement a
132+
*A.a == A->a : where a is a pointer to a struct
133+
A[i] where A is an array
134+
returns the i-th element of A
118135
```
119136

120137
### bitwise

0 commit comments

Comments
 (0)