\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{chris23balln} \pdfinfo{ /Title (c-reference.pdf) /Creator (Cheatography) /Author (chris23balln) /Subject (C Reference Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{0057A3} \definecolor{LightBackground}{HTML}{EFF4F9} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{C Reference Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{chris23balln} via \textcolor{DarkBackground}{\uline{cheatography.com/69951/cs/17730/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}chris23balln \\ \uline{cheatography.com/chris23balln} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Not Yet Published.\\ Updated 31st October, 2018.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{multicols*}{3} \begin{tabularx}{5.377cm}{x{2.23965 cm} x{2.73735 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Main Function}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{int main(int argc, char *argv{[}{]})\{return int;\}} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} {\bf{Function Arguments}}\{\{nobreak\}\} & {\bf{Description}} \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} int argc & Number of command line args \tn % Row Count 5 (+ 2) % Row 3 \SetRowColor{white} char *argv{[}{]}\{\{nobreak\}\} & Command line args in an array {\emph{name of program}} \tn % Row Count 8 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{0.82386 cm} p{0.68655 cm} x{3.06659 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{5.377cm}}{\bf\textcolor{white}{Data Types}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Type}} & {\bf{Bytes}} & {\bf{Range}} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} char & 1 & U:(0 to 2\textasciicircum{}8\textasciicircum{}-1) \{\{nl\}\} S:(-2\textasciicircum{}7\textasciicircum{} to 2\textasciicircum{}7\textasciicircum{}-1) \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} short & 2 & U:(0 to 2\textasciicircum{}16\textasciicircum{}-1) \{\{nl\}\} S:(-2\textasciicircum{}15\textasciicircum{} to 2\textasciicircum{}15\textasciicircum{}-1) \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} int & 4 & U:(0 to 2\textasciicircum{}31\textasciicircum{}-1) \{\{nl\}\} S:(-2\textasciicircum{}31\textasciicircum{} to 2\textasciicircum{}32\textasciicircum{}-1) \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} long & 4 & U:(0 to 2\textasciicircum{}31\textasciicircum{}-1) \{\{nl\}\} S:(-2\textasciicircum{}31\textasciicircum{} to 2\textasciicircum{}32\textasciicircum{}-1) \tn % Row Count 10 (+ 2) % Row 5 \SetRowColor{white} float & 4 & 6 decimal places \tn % Row Count 11 (+ 1) % Row 6 \SetRowColor{LightBackground} long long & 8 & U:(0 to 2\textasciicircum{}64\textasciicircum{}-1) \{\{nl\}\} S:(-2\textasciicircum{}31\textasciicircum{} to 2\textasciicircum{}32\textasciicircum{}-1) \tn % Row Count 13 (+ 2) % Row 7 \SetRowColor{white} double & 8 & 15 decimal places \tn % Row Count 14 (+ 1) % Row 8 \SetRowColor{LightBackground} long double & 10 & 19 decimal places \tn % Row Count 16 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.18988 cm} x{2.78712 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Math}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{\#include \textless{}math.h\textgreater{}\{\{ac\}\}} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} {\bf{Function}} & {\bf{Description}} \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} sin(x)\{\{nl\}\}sinh(x)\{\{nl\}\}asin(x) & Sine of x\{\{nl\}\}Hyperbolic sine of x\{\{nl\}\}Arc sine of x \tn % Row Count 5 (+ 3) % Row 3 \SetRowColor{white} cos(x)\{\{nl\}\}cosh(x)\{\{nl\}\}acos(x) & Cosine of x\{\{nl\}\}Hyperbolic cosine of x\{\{nl\}\}Arc cosine of x \tn % Row Count 8 (+ 3) % Row 4 \SetRowColor{LightBackground} tan(x)\{\{nl\}\}tanh(x)\{\{nl\}\}atan(x) & Tangent of x\{\{nl\}\}Hyperbolic tangent of x\{\{nl\}\}Arc tangent of x \tn % Row Count 11 (+ 3) % Row 5 \SetRowColor{white} exp(x) & Returns value of e raised to the xth power \tn % Row Count 13 (+ 2) % Row 6 \SetRowColor{LightBackground} log(x)\{\{nl\}\}log10(x) & Natural logarithm (base-e) of x\{\{nl\}\}Base-10 of x \tn % Row Count 16 (+ 3) % Row 7 \SetRowColor{white} pow(x,y) & Returns x raised to the power of y \tn % Row Count 18 (+ 2) % Row 8 \SetRowColor{LightBackground} sqrt(x) & Square root of x \tn % Row Count 19 (+ 1) % Row 9 \SetRowColor{white} abs(x) & Absolute value of x (\textless{}stdlib.h\textgreater{}) \tn % Row Count 21 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.23965 cm} x{2.73735 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Standard Library}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{\#include \textless{}stdlib.h\textgreater{}\{\{ac\}\}} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} {\bf{Function}} & {\bf{Description}} \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} rand() & Returns a random long \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} qsort(array, length, size, compr) & Quick Sort "array" of array "length" with elements of "size" by function "compr" \tn % Row Count 7 (+ 4) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{{\emph{Compr Function}}} \tn % Row Count 8 (+ 1) % Row 5 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{int cmpfunc(const void {\emph{ a, const void }} b);\{return (\{\{literal\}\}{\emph{(int}})a - {\emph{(int}})b );\}} \tn % Row Count 10 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.64241 cm} x{3.33459 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Char Library}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{\#include \textless{}ctype.h\textgreater{}\{\{ac\}\}} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \seqsplit{tolower(char)} & Lowercase char \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} \seqsplit{toupper(char)} & Uppercase char \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} \seqsplit{islower(char)} & Checks if char is lowercase \tn % Row Count 5 (+ 2) % Row 4 \SetRowColor{LightBackground} \seqsplit{isupper(char)} & checks if char is uppercase \tn % Row Count 7 (+ 2) % Row 5 \SetRowColor{white} \seqsplit{isnumber(char)} & Checks if char is 0-9 \tn % Row Count 9 (+ 2) % Row 6 \SetRowColor{LightBackground} \seqsplit{isalpha(char)} & Checks if char is a letter \tn % Row Count 10 (+ 1) % Row 7 \SetRowColor{white} \seqsplit{isblank(char)} & Checks if char is whitespace \tn % Row Count 12 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.18988 cm} x{2.78712 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Strings}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{\#include \textless{}string.h\textgreater{}\{\{ac\}\}} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} {\bf{Function}} & {\bf{Description}} \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} strlen(str)\{\{nobreak\}\} & Return length of string "str" \tn % Row Count 4 (+ 2) % Row 3 \SetRowColor{white} strcat(dest,src)\{\{nobreak\}\} & Appends "src" to end of the string "dest" \tn % Row Count 6 (+ 2) % Row 4 \SetRowColor{LightBackground} strncat(dest,src,n)\{\{nobreak\}\} & Appends "src" to end of the string "dest" by upto "n" characters long \tn % Row Count 10 (+ 4) % Row 5 \SetRowColor{white} strcpy(dest,str)\{\{nobreak\}\} & Copy string "str" to "dest" and return "dest" \tn % Row Count 13 (+ 3) % Row 6 \SetRowColor{LightBackground} strncpy(dest,src,n)\{\{nobreak\}\} & Copy "n" characters from "src" to "dest", return "dest" \tn % Row Count 16 (+ 3) % Row 7 \SetRowColor{white} strcmp(str1,str2)\{\{nobreak\}\} & Compares "str1" to "str2" \tn % Row Count 18 (+ 2) % Row 8 \SetRowColor{LightBackground} strncmp(str1,str2,n)\{\{nobreak\}\} & Compares the first "n" bytes of "str1" to "str2" \tn % Row Count 21 (+ 3) % Row 9 \SetRowColor{white} strtok(str,delim) & Breaks string "str" into a series of tokens separated by "delim" \tn % Row Count 24 (+ 3) % Row 10 \SetRowColor{LightBackground} memcpy(dest,src,n)\{\{nobreak\}\} & Copies "n" characters from "src" to "dest" \tn % Row Count 26 (+ 2) % Row 11 \SetRowColor{white} memset(str,c,n)\{\{nobreak\}\} & Copies the char "c" to the first "n" characters of the string "str" \tn % Row Count 30 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.78712 cm} x{2.18988 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Arrays}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{{\bf{Declaration}}} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} type arrayName{[}size{]};\{\{nl\}\}type arrayName{[}size{]}{[}size{]};\{\{nobreak\}\} & 1-Dimensional\{\{nl\}\}2-Dimensional \tn % Row Count 4 (+ 3) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{{\bf{Initialization}}} \tn % Row Count 5 (+ 1) % Row 3 \SetRowColor{white} int myArray{[}2{]} = \{3,4\};\{\{nl\}\}int myArray{[}2{]} = \{3\} & Each element\{\{nl\}\}All elements 3 \tn % Row Count 8 (+ 3) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{{\bf{Accessing}}} \tn % Row Count 9 (+ 1) % Row 5 \SetRowColor{white} int a = myArray{[}c{]}; & Value at "c" position \tn % Row Count 11 (+ 2) % Row 6 \SetRowColor{LightBackground} \&myArray{[}c{]} & Memory address at "c" position \tn % Row Count 13 (+ 2) % Row 7 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{{\bf{Array Size}}} \tn % Row Count 14 (+ 1) % Row 8 \SetRowColor{LightBackground} sizeof(myArray); & Returns length of array \tn % Row Count 16 (+ 2) % Row 9 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{{\bf{Passing to Function}}} \tn % Row Count 17 (+ 1) % Row 10 \SetRowColor{LightBackground} void foo(int *myArray) & Passed as pointer to array \tn % Row Count 19 (+ 2) % Row 11 \SetRowColor{white} void foo(int myArray{[}{]}) & Passed array \tn % Row Count 21 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.4977 cm} p{0.4977 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Pointers}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{{\emph{A pointer is a variable who's value is an address of another variable}}} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{{\bf{In Arrays}}} \tn % Row Count 3 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.74195 cm} x{3.23505 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Keywords (Non-trivial)}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Keyword}}\{\{nobreak\}\} & {\bf{Definition}} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} auto & Defines variables as having a local lifetime \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} default & Declaration of a default case \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} extern & Extend the visiblity of the variables and functions \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} register & Hints to compiler that a given variable can be put in a register \tn % Row Count 11 (+ 3) % Row 5 \SetRowColor{white} union & Allows storage of different data types in same memory location \tn % Row Count 14 (+ 3) % Row 6 \SetRowColor{LightBackground} volatile & Used when a variable can change unexpectedly \tn % Row Count 16 (+ 2) % Row 7 \SetRowColor{white} typedef & Assigns alternative names to existing types \tn % Row Count 18 (+ 2) % Row 8 \SetRowColor{LightBackground} static & Preserves value even after out of scope \tn % Row Count 20 (+ 2) % Row 9 \SetRowColor{white} enum & Used to assign names to integral constants \tn % Row Count 22 (+ 2) % Row 10 \SetRowColor{LightBackground} continue & Forces the next iteration in a loop \tn % Row Count 24 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.09034 cm} x{2.88666 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Memory}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Function}} & {\bf{Description}} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} calloc(n,size)\{\{nobreak\}\} & Alloc array of "n" elements each of size in bytes "size" \{\{nl\}\}p=(T*)calloc(n,sizeof(t)) \tn % Row Count 5 (+ 4) % Row 2 \SetRowColor{LightBackground} malloc(n) & Alloc array of "n" bytes \{\{nl\}\}p=(T*)malloc(sizeof(t)) \tn % Row Count 8 (+ 3) % Row 3 \SetRowColor{white} realloc(addr,size)\{\{nobreak\}\} & Re-allocates memory extending it upto "size" \tn % Row Count 10 (+ 2) % Row 4 \SetRowColor{LightBackground} free(addr) & Releases block of memory specified by "addr" \tn % Row Count 12 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.4885 cm} x{2.4885 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{File Input / Output}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{\#include \textless{}stdio.h\textgreater{}\{\{ac\}\}} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} {\bf{Function}} & {\bf{Description}} \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} fopen(filename,mode)\{\{nobreak\}\} & Open file/create new\{\{nl\}\}(Mode: r,w,a,r+,w+,a+) \tn % Row Count 5 (+ 3) % Row 3 \SetRowColor{white} fclose( FILE *fp ) & Closes file(Retuns 0 for success, EOF for failure) \tn % Row Count 8 (+ 3) % Row 4 \SetRowColor{LightBackground} fputc(int c, FILE *fp) & Writes character vaue to output stream pointed by fp \tn % Row Count 11 (+ 3) % Row 5 \SetRowColor{white} fputs(const char {\emph{s, FILE }}fp) & Writes string to output stream pointed by fp \tn % Row Count 14 (+ 3) % Row 6 \SetRowColor{LightBackground} fgetc(FILE * fp) & Reads a character from input stream fp \tn % Row Count 16 (+ 2) % Row 7 \SetRowColor{white} fgets(char {\emph{buf, \{\{nl\}\}~int n, FILE }}fp) & Reads n characters from input stream fp into buf \tn % Row Count 19 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.09034 cm} x{2.88666 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Standard Input / Output}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Function}} & {\bf{Descrition}} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} getchar() & Reads next available character from screen \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} putchar(int c) & Puts character "c" on screen \tn % Row Count 5 (+ 2) % Row 3 \SetRowColor{white} gets(char *s) & Reads line from stdin to buffer "s" \tn % Row Count 7 (+ 2) % Row 4 \SetRowColor{LightBackground} puts(const char *s) & Writes string "s" to stdout \tn % Row Count 9 (+ 2) % Row 5 \SetRowColor{white} scanf(const char *format,..) & Scans input from stdin into format \tn % Row Count 11 (+ 2) % Row 6 \SetRowColor{LightBackground} printf(const char *format,..) & Writes output to stdout according to format \tn % Row Count 13 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}