summaryrefslogtreecommitdiffhomepage
path: root/c.html.markdown
diff options
context:
space:
mode:
authorLevi Bostian <levi.bostian@gmail.com>2013-08-31 19:24:15 -0500
committerLevi Bostian <levi.bostian@gmail.com>2013-08-31 19:24:15 -0500
commit8caf3768fb4a1f0fa14ca4765e7f168534c7cd8f (patch)
treeea34be1544179c0f3be5357fd2f3a1f49ad098dd /c.html.markdown
parentd632203255085171ce79a106a40797d1d5fa54a3 (diff)
Add extern notes to C.
Diffstat (limited to 'c.html.markdown')
-rw-r--r--c.html.markdown8
1 files changed, 7 insertions, 1 deletions
diff --git a/c.html.markdown b/c.html.markdown
index ee60d168..2a828ab7 100644
--- a/c.html.markdown
+++ b/c.html.markdown
@@ -99,7 +99,7 @@ int main() {
unsigned int ux_int;
unsigned long long ux_long_long;
- // chars inside single quotes '*' are ASCII versions of
+ // chars inside single quotes '*' are character constants.
'0' //==> 48 on the ASCII table.
'A' //==> 65 on the ASCII table.
@@ -472,6 +472,12 @@ while ((c = getchar()) != EOF) { // EOF constant "end of file".
char c = getchar();
}
+//if referring to external variables outside function, must use extern keyword.
+int i = 0;
+void testFunc() {
+ extern int i; //i here is now using external variable i
+}
+
/*
char c[] = "This is a test.";
str_reverse(c);