mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 23:33:00 +03:00
Add to notes on increment and decrement operators.
This commit is contained in:
parent
ec7ee88698
commit
868be425a6
@ -205,8 +205,11 @@ int main() {
|
||||
z = (a > b) ? a : b; // => 10 "if a > b return a, else return b."
|
||||
|
||||
//Increment and decrement operators:
|
||||
s[j++]; //returns value of j to s THEN increments value of j.
|
||||
s[++j]; //increments value of j THEN returns value of j to s.
|
||||
char *s = "iLoveC"
|
||||
int j = 0;
|
||||
s[j++]; // => "i" Returns value of j to s THEN increments value of j.
|
||||
j = 0;
|
||||
s[++j]; // => "L" Increments value of j THEN returns value of j to s.
|
||||
// same with j-- and --j
|
||||
|
||||
// Bitwise operators!
|
||||
|
Loading…
Reference in New Issue
Block a user