From 7c559d57a88143b0cbe7b16dbd071f0e07c83b32 Mon Sep 17 00:00:00 2001 From: Levi Bostian Date: Fri, 20 Sep 2013 22:05:08 -0500 Subject: Move special characters to end of file --- c.html.markdown | 61 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 30 insertions(+), 31 deletions(-) (limited to 'c.html.markdown') diff --git a/c.html.markdown b/c.html.markdown index 2a65d82c..9745ed9a 100644 --- a/c.html.markdown +++ b/c.html.markdown @@ -20,37 +20,6 @@ memory management and C will take you as far as you need to go. Multi-line comments look like this. They work in C89 as well. */ -//Special characters: -'\a' // alert (bell) character -'\n' // newline character -'\t' // tab character (left justifies text) -'\v' // vertical tab -'\f' // new page (formfeed) -'\r' // carriage return -'\b' // backspace character -'\0' // null character. Usually put at end of strings in C lang. - // hello\n\0. \0 used by convention to mark end of string. -'\\' // backspace -'\?' // question mark -'\'' // single quote -'\"' // double quote -'\xhh' // hexadecimal number. Example: '\xb' = vertical tab character -'\ooo' // octal number. Example: '\013' = vertical tab character - -//print formatting: -"%d" // integer -"%3d" // integer with minimum of length 3 digits (right justifies text) -"%s" // string -"%f" // float -"%ld" // long -"%3.2f" // minimum 3 digits left and 2 digits right decimal float -"%7.4s" // (can do with strings too) -"%c" // char -"%p" // pointer -"%x" // hexidecimal -"%o" // octal -"%%" // prints % - // Constants: #define (no semicolon at end) #define DAYS_IN_YEAR = 365 @@ -590,6 +559,36 @@ typedef void (*my_fnp_type)(char *); // ... // my_fnp_type f; +//Special characters: +'\a' // alert (bell) character +'\n' // newline character +'\t' // tab character (left justifies text) +'\v' // vertical tab +'\f' // new page (formfeed) +'\r' // carriage return +'\b' // backspace character +'\0' // null character. Usually put at end of strings in C lang. + // hello\n\0. \0 used by convention to mark end of string. +'\\' // backspace +'\?' // question mark +'\'' // single quote +'\"' // double quote +'\xhh' // hexadecimal number. Example: '\xb' = vertical tab character +'\ooo' // octal number. Example: '\013' = vertical tab character + +//print formatting: +"%d" // integer +"%3d" // integer with minimum of length 3 digits (right justifies text) +"%s" // string +"%f" // float +"%ld" // long +"%3.2f" // minimum 3 digits left and 2 digits right decimal float +"%7.4s" // (can do with strings too) +"%c" // char +"%p" // pointer +"%x" // hexidecimal +"%o" // octal +"%%" // prints % /////////////////////////////////////// // Order of Evaluation -- cgit v1.2.3