diff options
Diffstat (limited to 'c.html.markdown')
-rw-r--r-- | c.html.markdown | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/c.html.markdown b/c.html.markdown index e55ff148..d7c682ad 100644 --- a/c.html.markdown +++ b/c.html.markdown @@ -454,6 +454,12 @@ void str_reverse(char *str_in) } } +/* +char c[] = "This is a test."; +str_reverse(c); +printf("%s\n", c); // => ".tset a si sihT" +*/ + //if referring to external variables outside function, must use extern keyword. int i = 0; void testFunc() { @@ -467,11 +473,7 @@ void testFunc() { } //**You may also declare functions as static to make them private** -/* -char c[] = "This is a test."; -str_reverse(c); -printf("%s\n", c); // => ".tset a si sihT" -*/ + /////////////////////////////////////// // User-defined types and structs |