mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-24 15:51:41 +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."
|
z = (a > b) ? a : b; // => 10 "if a > b return a, else return b."
|
||||||
|
|
||||||
//Increment and decrement operators:
|
//Increment and decrement operators:
|
||||||
s[j++]; //returns value of j to s THEN increments value of j.
|
char *s = "iLoveC"
|
||||||
s[++j]; //increments value of j THEN returns value of j to s.
|
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
|
// same with j-- and --j
|
||||||
|
|
||||||
// Bitwise operators!
|
// Bitwise operators!
|
||||||
|
Loading…
Reference in New Issue
Block a user