https://www.geeksforgeeks.org/c/c-cheatsheet/

This C Cheat Sheet provides an overview of both basic and advanced concepts of the C language. Whether you're a beginner or an experienced programmer, this cheat sheet will help you revise and quickly go through the core principles of the C language.

 C Language Cheatsheet

Click to enlarge

In this Cheat Sheet, we will delve into the basics of the C language, exploring its fundamental concepts that lay the groundwork for programming. We will cover topics such as variables, data types, and operators, providing you with a solid understanding of the building blocks of C programming.

Basic Syntax

Consider the below Hello World program:

// C Hello World program
#include <stdio.h>

int main()
{
    printf("Hello World!");
    return 0;
}

Here,

Variables

A variable is the name given to the memory location that stores some data.

Syntax of Variable

data_type variable_name;
data_type variable_name = initial_value;

A variable can be of the following types:

  1. Local Variable