Abstract
Entry point function
A C program must have a function with the function signature
int main()
. It is the standardised entry point, ensuring proper interaction with the operating system.
What does
a = b = c = 3 + 6
mean?
9
assigned to variablesc
,b
anda
.
c = 3 + 6
returns9
which is assigned tob
, thenb = 9
returns9
which is assigned toa
.c = 3 + 6
returns9
is known as side effect.
Remainder operation in C
10 % 4
gives2
,-10 % 4
gives-2
. The sign of the dividend is preserved.
C Terminology
Terminology | Meaning |
---|---|
C Vector | Basically Array |
C Structs | Allow grouping of heterogenous data |
C Operator Precedence
- If we want operators with lower precedence to execute first, we need to use parentheses