C Programming

From Nerdica Wiki
Jump to: navigation, search

Basic Format Specifiers

%d = an integer whole number = 100
%f = a floating point number = 0.123456
%c = a single character = 'A'
%s = a string of characters = "Hello World"
%p = a machine memory address = 0x0022FF5C
%u = a unsigned int
%lu = a long unsigned int
%llu = a long long unsigned int

Keywords

auto extern sizeof
break float static
case for struct
char goto switch
const if typedef
continue int union
default long unsigned
do register void
double return volatile
else short while
enum signed

Escape Sequences

\n newline \\ backslash
\t horizontal tab \? question mark
\v vertical tab \' single quote
\b backspace \" double quote
\r carriage return \000 octal number
\f form feed \xhh hexadecimal number
\a audible alert \0 null character