🔥Limited Offer: Get 50% OFFon AI & Full Stack Courses🔥
All Subjects
Free · 99 Topics · No Signup

C Notes

Core C — syntax, pointers, memory, structures and systems programming — written by CodingNow 2.0's mentors. Free to read, structured to actually help you learn.

C notes by CodingNow 2.0 cover 99 topics — from c home to c projects — each explained with short definitions, syntax and runnable code examples. They are 100% free, need no signup, and work as quick revision for college exams, C interviews and CodingNow 2.0's mentor-led C course in Pitampura, Delhi.

No notes found. Try a different search term, or browse all C notes.

C Tutorial

60 of 60 topics published
1

C HOME

C is a general-purpose programming language that has been widely used for over 50 years.

2

C Intro

C is a general-purpose programming language created by Dennis Ritchie at Bell Labs in 1972.

3

C Get Started

At W3Schools, you can start learning C without installing anything.

4

C Syntax

You have already seen the following code a couple of times in the first chapters. Let's break it down and understand what each part does:

5

Statements

A computer program is a list of instructions that a computer follows.

6

C Output

To output values or print text in C, you can use the printf() function:

7

New Lines

To start a new line when printing text, you can use the \n character:

8

C Comments

Comments are notes for humans. They help explain code and make it easier to read.

9

C Variables

Variables are containers for storing data values, like numbers and characters.

10

Format Specifiers

Format specifiers are used together with the printf() function to print variables.

11

Change Values

If you assign a new value to an existing variable, the new value will replace the old one:

12

Multiple Variables

To declare more than one variable of the same type, use a comma-separated list:

13

Variable Names

All C variables must be identified with unique names.

14

Real-Life Examples

Often in our examples, we simplify variable names to match their data type (myInt or myNum for int types, myChar for char types, and so on). This is done to

15

C Data Types

As explained in the Variables chapter, a variable in C must be a specified data type, and you must use a format specifier inside the printf() function to disp

16

Characters

The char data type is used to store a single character.

17

Numbers

Use int when you need to store a whole number without decimals, like 35 or 1000, and float or double when you need a floating point number (with decimals)

18

Decimal Precision

You have probably already noticed that if you print a floating point number, the output will show many digits after the decimal point:

19

Memory Size

We introduced in the data types chapter that the memory size of a variable varies depending on the type:

20

Real-Life Example

Here's a real-life example of using different data types, to calculate and output the total cost of a number of items:

21

Extended Types

Besides the basic types ( int , float , double , char ), C also gives you extended keywords ( short , long , unsigned ) to control how large the number is,

22

C Type Conversion

Sometimes, you have to convert the value of one data type to another type. This is known as type conversion.

23

C Constants

Now that you have seen different types of variables in C, you should also know that sometimes you need variables that should not change.

24

C Operators

Operators are used to perform operations on variables and values.

25

Arithmetic

Arithmetic operators are used to perform common mathematical operations.

26

Assignment

Assignment operators are used to assign values to variables.

27

Comparison

Comparison operators are used to compare two values (or variables). This is important in programming, because it helps us to find answers and make decisions.

28

Logical

As with comparison operators, you can also test for true or false values with logical operators.

29

Precedence

When a calculation contains more than one operator, C follows order of operations rules to decide which part to calculate first.

30

C Booleans

Very often, in programming, you will need a data type that can only have one of two values, like:

31

Real-Life Examples

Let's use booleans in a real-life example where we want to find out if a person is old enough to vote.

32

C If...Else

You already know that C supports familiar comparison conditions from mathematics, such as:

33

else

Use the else statement to specify a block of code to be executed if the condition is false .

34

else if

Use the else if statement to specify a new condition to test if the first condition is false .

35

Short Hand If

There is also a short-hand if...else , known as the ternary operator because it uses three operands.

36

Nested If

You can also place an if statement inside another if . This is called a nested if statement.

37

Logical Operators

You can combine or reverse conditions using logical operators. These work together with if , else , and else if to build more complex decisions.

38

Real-Life Examples

This example shows how you can use if..else to "open a door" if the user enters the correct code:

39

C Switch

Instead of writing many if..else statements, you can use the switch statement.

40

C While Loop

Loops can execute a block of code as long as a specified condition is true.

41

Do/While Loop

The do/while loop is a variant of the while loop. This loop will execute the code block once, before checking if the condition is true, then it will repeat

42

Real-Life Examples

To demonstrate a practical example of the while loop, we have created a simple "countdown" program:

43

C For Loop

When you know exactly how many times you want to loop through a block of code, use the for loop instead of a while loop:

44

Nested Loops

It is also possible to place a loop inside another loop. This is called a nested loop.

45

Real-Life Examples

To demonstrate a practical example of the for loop, let's create a program that counts to 100 by tens:

46

C Break/Continue

You have already seen the break statement used in an earlier chapter of this tutorial. It was used to "jump out" of a switch statement.

47

C Arrays

Arrays are used to store multiple values in a single variable, instead of declaring separate variables for each value.

48

Array Size

To get the size of an array, you can use the sizeof operator:

49

Array Loops

You can use a for loop to go through the elements of an array by writing the size of the array in the loop condition (in this example the array has 4 elements

50

Real-Life Examples

To demonstrate a practical example of using arrays, let's create a program that calculates the average of different ages:

51

Multidimensional Arrays

In the previous chapter, you learned about arrays, which is also known as single dimension arrays. These are great, and something you will use a lot while progr

52

C Strings

Strings are used for storing text/characters.

53

Special Characters

Because strings must be written within quotes, C will misunderstand this string, and generate an error:

54

String Functions

C also has many useful string functions, which can be used to perform certain operations on strings.

55

C User Input

You have already learned that printf() is used to output values in C.

56

C Memory Address

When a variable is created in C, a memory address is assigned to the variable.

57

C Pointers

You learned from the previous chapter, that we can get the memory address of a variable with the reference operator & :

58

Pointers & Arrays

You can also use pointers to access arrays.

59

Pointer Arithmetic

Pointer arithmetic means changing the value of a pointer to make it point to a different element in memory.

60

Pointer to Pointer

You can also have a pointer that points to another pointer. This is called a pointer to pointer (or "double pointer").

Ready to go from notes to a real career?

Join CodingNow 2.0's C course — live mentorship, hands-on projects, and 100% placement support in Delhi NCR.

Enroll Now — Free Demo Available

C Notes – FAQs

What students search before reading C notes.

Yes — all 99 C topics on CodingNow 2.0 are completely free with no signup or paywall. Read them in the browser on mobile or desktop.
This hub covers 99 structured C topics — from absolute basics to advanced, interview-ready concepts — each with short explanations and working code examples.
The notes are written to be self-study friendly, but for job-ready skills, projects and placement support, CodingNow 2.0's mentor-led C course in Delhi (online + classroom) is the fastest path.
Yes. Each topic is concise and example-driven — ideal for last-minute revision before college exams, campus placements and C job interviews in India.
Working AI/ML engineers and full-stack developers from CodingNow 2.0 – Gurukul of AI, Pitampura Delhi, aligned with our 2026 course curriculum.
WhatsApp
Call NowEnroll Now