Skip to content

Commit 7275894

Browse files
authored
Update C_syntax.md
included more explanations on ops
1 parent e64b7d3 commit 7275894

File tree

1 file changed

+29
-3
lines changed

1 file changed

+29
-3
lines changed

LearningC/C_Language_Shorts/C_syntax.md

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,38 @@ void: no variable/value
9595
## Operators
9696

9797
### binary
98-
\+ \- \* / % ^ \
98+
```
99+
a <op> b, where <op> os one of:
100+
+ - * / % (modulo) ^ (power)
101+
```
102+
99103
### unary
100-
& | ^ ~
104+
```
105+
<op>a, where <op> os one of:
106+
& * ~ -
107+
```
108+
101109
### incremental
102-
\++ \--
110+
```
111+
<op>a or a<op>, where <op> os one of:
112+
++ (+=1) -- (-=1)
113+
```
114+
### accessing
115+
```
116+
A.a where A is a struct
117+
returns elemement a
118+
```
103119

120+
### bitwise
121+
```
122+
a<op>b, where <op> os one of:
123+
& (and) | (or) ^ (Xor) ~ (not)
124+
```
125+
### logic
126+
```
127+
a<op>b, where <op> os one of:
128+
&& (and) || (or) ^ (Xor) ! (not)
129+
```
104130

105131
## Functions
106132
Functions have a **prototype** which defines parameters and return value.

0 commit comments

Comments
 (0)