mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-04-26 23:23:55 +00:00
Fix c - the first character of ILoveC is I not i (#2253)
This commit is contained in:
parent
e0c220a717
commit
02db6f2bfc
@ -238,7 +238,7 @@ int main (int argc, char** argv)
|
||||
// Increment and decrement operators:
|
||||
char *s = "ILoveC";
|
||||
int j = 0;
|
||||
s[j++]; // => "i". Returns the j-th item of s THEN increments value of j.
|
||||
s[j++]; // => "I". Returns the j-th item of s THEN increments value of j.
|
||||
j = 0;
|
||||
s[++j]; // => "L". Increments value of j THEN returns j-th value of s.
|
||||
// same with j-- and --j
|
||||
@ -779,4 +779,4 @@ Readable code is better than clever code and fast code. For a good, sane coding
|
||||
|
||||
Other than that, Google is your friend.
|
||||
|
||||
[1] http://stackoverflow.com/questions/119123/why-isnt-sizeof-for-a-struct-equal-to-the-sum-of-sizeof-of-each-member
|
||||
[1] http://stackoverflow.com/questions/119123/why-isnt-sizeof-for-a-struct-equal-to-the-sum-of-sizeof-of-each-member
|
||||
|
Loading…
Reference in New Issue
Block a user