Posts

c programming cheat sheet

  C Language Cheat Sheet Basics Basic syntax and functions from the C programming language. Boilerplate Code # include <stdio.h> int main () { return ( 0 ); } printf function It is used to show output on the screen printf ( "Hello World!" ) scanf function It is used to take input from the user scanf ( "placeholder" , variables) Comments A comment is the code that is not executed by the compiler, and the programmer uses it to keep track of the code. Single line comment // It's a single line comment   Multi-line comment /* It's a multi-line comment */ Data types The data type is the type of data Character type Typically a single octet(one byte). It is an integer type char variable_name;   Integer type The most natural size of integer for the machine int variable_name; Float type A single-precision floating-point value float variable_name; Double type A double-precision floati...