C > Code Snippets Code Examples A simple program using pointers A simple string copy A very simple text editor Abort current process returning error code: how to use abort Absolute value of long integer: how to use labs Add format to scanf Add function to the Ternary operator Add null terminator to string end Adds up 5 numbers Allocate array in memory: how to use calloc Allocate memory and reallocate Allocate memory block: how to use malloc Allocate memory for struct allocate memory Allocate space for a string dynamically allocates sufficient memory for an array of num objects of size size Analyze comma-separated list of words Append string: how to use strcat Append substring to string: strncat Array initialization Arrays and pointers: char array index Assign an int value using a pointer Assign function which is called when exit Assign value to char pointer Assign value to global variable associates an existing stream with a different file Beep a sound Binary search:bsearch in stdlib.h Bitwise calculation Bitwise operator Block if else statement By default, the blank characters are space and horizontal tab Calculate arccosine: acos Calculate arcsine: how to use asin Calculate arctangent: how to use atan Calculate cosine: how to use cos Calculate exponential: how to use exp Calculate hyperbolic cosine: how to use cosh Calculate hyperbolic sine: how to use sinh Calculate hyperbolic tangent: how to use tanh Calculate natural log: how to use log Calculate numeric power: how to use pow Calculate sine: sin Calculate square root: how to use sqrt Calculate tangent: tan Calculating a floating-point average using pointers Calculating an average using variable argument lists Calculating factorials using recursion Calculating the area of a room Calculation between int and float Calculation: divide and mod, / % causes immediate, normal termination of a program Change stream buffering: how to setbuf Change string case using its pointer Change string to integer changes the file name Characters in the format control string Char's pointer's pointer check for a file error Check for errors: How to use ferror Page 1 Page 2 Page 3 Page 11