summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLevi Bostian <levi.bostian@gmail.com>2015-01-10 23:24:41 -0600
committerLevi Bostian <levi.bostian@gmail.com>2015-01-10 23:24:41 -0600
commit8a2c08cc88710fea61546b4fa1cd7d39170ca435 (patch)
treef8c84076bad19c033e4a39e77e8cb3f85a4969d3
parentd9acb208ed6f807b431a4d78aff7060b86799177 (diff)
parentd1171443ddc0eda7cbabfc41d110a76a67e494ab (diff)
Merge pull request #915 from mordner/c-fix
C: two minor fixes
-rw-r--r--c.html.markdown5
1 files changed, 3 insertions, 2 deletions
diff --git a/c.html.markdown b/c.html.markdown
index b5b804af..7670824a 100644
--- a/c.html.markdown
+++ b/c.html.markdown
@@ -386,7 +386,8 @@ int main() {
// or when it's the argument of the `sizeof` or `alignof` operator:
int arraythethird[10];
int *ptr = arraythethird; // equivalent with int *ptr = &arr[0];
- printf("%zu, %zu\n", sizeof arraythethird, sizeof ptr); // probably prints "40, 4" or "40, 8"
+ printf("%zu, %zu\n", sizeof arraythethird, sizeof ptr);
+ // probably prints "40, 4" or "40, 8"
// Pointers are incremented and decremented based on their type
@@ -477,7 +478,7 @@ void testFunc() {
}
//make external variables private to source file with static:
-static int j = 0; //other files using testFunc() cannot access variable i
+static int j = 0; //other files using testFunc2() cannot access variable j
void testFunc2() {
extern int j;
}