summaryrefslogtreecommitdiffhomepage
path: root/c.html.markdown
diff options
context:
space:
mode:
Diffstat (limited to 'c.html.markdown')
-rw-r--r--c.html.markdown7
1 files changed, 3 insertions, 4 deletions
diff --git a/c.html.markdown b/c.html.markdown
index d075ea0e..ee35cdd2 100644
--- a/c.html.markdown
+++ b/c.html.markdown
@@ -453,15 +453,14 @@ void str_reverse(char *str_in)
/////////////////////////////////////
// Built in functions:
/////////////////////////////////////
-// from stdio.h:
-// getchar()
-int c = getchar(); //reads character from input.
+// from: #include <stdio.h>
+// ** getchar() **
+// int c = getchar(); //reads character from input.
// If input = hi, 'h' is returned then next call, 'i' returned.
while ((c = getchar()) != EOF) { // EOF constant "end of file".
// Linux: CTRL+D, Windows: CTRL+X
// must have () around getchar() as != is run before =.
putchar(c); //prints character (without newline at end)
- char c = getchar();
}
//if referring to external variables outside function, must use extern keyword.