diff options
Diffstat (limited to 'c.html.markdown')
-rw-r--r-- | c.html.markdown | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/c.html.markdown b/c.html.markdown index f1e328cf..f67f6c4a 100644 --- a/c.html.markdown +++ b/c.html.markdown @@ -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! |