What is C Programming? A Complete Guide

C Programming is a fast and efficient programming language that was originally created to develop the Unix operating system. It was created by Dennis Ritchie at Bell Labs in the 1970s. Being a highly efficient language, it is used to create famous operating systems like Linux, Windows, and Mac and popular programming languages like Python, Java, … Read more

Recursion in C Programming

The process of calling a function by itself is called recursion and the function which calls itself is called recursive function. Recursion is used to solve various mathematical problems by dividing it into smaller problems. This method of solving a problem is called Divide and Conquer. In programming, it is used to divide complex problem into simpler ones and solving them individually.

Functions in C Programming

Function is a logically grouped set of statements that perform a specific task. In C program, a function is created to achieve something. Every C program has at least one function i.e. main() where the execution of the program starts. It is a mandatory function in C.

Arrays in C Programming

Array is a collection of data of same types stored in sequential memory location. It is a linear data structure, where data is stored linearly one after the other. The elements in an array is accessed using an index. In C, the index of array starts from zero. For example, in an array of n elements, the first element has index zero and the last element has index (n-1). Elements with consecutive index (i.e.

Nested loop in C

A loop inside another loop is called a nested loop. The depth of nested loop depends on the complexity of a problem. We can have any number of nested loops as required. Consider a nested loop where the outer loop runs n times and consists of another loop inside it. The inner loop runs m times. Then, the total number of times the inner loop runs during the program execution is n*m.

for loop in C Programming

Looping is a process of repeating a certain group of statements until a specified condition is satisfied. There are three types of loop in C. They are:

do-while loop in C Programming

Looping is a process of repeating a certain group of statements until a specified condition is satisfied. There are three types of loop in C. They are:

while loop in C Programming

Looping is a process of repeating a certain group of statements until a specified condition is satisfied. There are three types of loop in C. They are:

switch case statement in C programming

switch case is a multiple branching statement which compares the value of expression or variable inside switch() with various cases provided with the statement and executes a block when a match is found. If no cases inside the switch is matched, the statements inside default block is executed. However, default is optional and may not be present.

if statement in C Programming

Decision making is an important part of programming. Every programming language supports decision making statements allowing programmers to branch according to the condition. In C programming language, if statement is used to check condition and make decision. The decisions or statements are enclosed inside curly braces, however if only a single statement has to be executed, curly braces are not mandatory.