How to extract numbers from a string in C?

In this article, you’ll learn how to get numbers from a string in C with examples. There are many ways to do that, but my favorite a recommended method is …

Read More

C++ program to convert quarter, dime and nickel to cent

The following C++ program converts quarters, dimes and nickels to cents. It is assumed that you know the basic syntax of a C++ program. In this article, you’ll learn: To …

Read More

C program to delete an element from an array

This C program takes the position as input from the user and deletes the element of array at that position.In this program, the original array and its size is also …

Read More

C program to insert an element in an array

This C program inserts an element in an array after it’s created. Here, the initial array is also entered by the user and then a new element is inserted at …

Read More

C program to print prime numbers between two numbers

Prime numbers are the numbers which have only two factors, 1 and the number itself. That means, they are not divisible by any number other than one and the number …

Read More

C program to print Fibonacci series

This C program takes the number of terms in the Fibonacci series as input from the user and then prints entered number of terms of the Fibonacci series. Program: Print …

Read More

C program to find factorial of a number

In this article, we’ll learn ways to find the factorial of a number in C. The factorial of a non-negative integer n, denoted by n!, is the product of all …

Read More

C program to reverse a string without using strrev() function

Reversing a string is a very common question in basic programming interviews. In this article, we’ll learn how to reverse a string in C without using strrev() function. This C …

Read More

Insertion sort in C

In this post, you’ll learn about the insertion sort algorithm in C and how to implement it in the C programming language with and without a function using example programs. …

Read More

Selection sort in C

In this article, you’ll learn about the selection sort algorithm and its implementation program in the C programming language with and without a function in easiest possible way. Selection sort …

Read More

Bubble sort in C

In this article, you’ll learn about the bubble sort algorithm and how to implement it in the C programming language with and without a function in easiest way. Bubble sort …

Read More

C program to check perfect number

This is the C program to check whether a number is a perfect number or not. The user enters a number as input and this program checks if it a …

Read More

Decimal to octal in C

This is a C program to find the octal equivalent of a decimal number. The first program does it without using a function and the second uses a function to …

Read More

C program to calculate the number of words in a sentence

This C program reads a sentence until a ‘.’ is encountered and then calculates the number of words in the sentence. Program: Encounter a full stop and then count the …

Read More

C program for matrix multiplication

This program implements matrix multiplication in the C programming language. Basic mathematics: A * B is different from B * A. To multiply two matrices, the matrices must be multiplicable, …

Read More

C program to implement call by value and call by reference

This C program implements the types of function calls in C, the call by value and call by reference. This example tries to explain how call by value and call …

Read More

C program to add two matrices

This C program adds two matrices entered by the user. To add matrices, the dimensions of the matrices must be same. To add two matrices, we add the corresponding elements …

Read More