Blog

python tutorials and learn python

Created with Sketch.

C Program to Calculate Average Using Arrays

C Program to Calculate Average Using Arrays This program takes n number of elements from the user (where n is specified by the user), stores data in an array, and calculates the average of those numbers. Source Code to Calculate Average Using Arrays Output Enter the numbers of elements: 6 1. Enter number: 45.3 2.…
Read more

C program to calculate the power using recursion

C program to calculate the power using recursion This program calculates the power of a number using recursion. Example: Program to calculate the power using recursion Output Enter base number: 3 Enter power number(positive integer): 4 3^4 = 81 Example C program to calculate the power of a number using recursion: In this program, we…
Read more

C program to Reverse a Sentence Using Recursion

C program to Reverse a Sentence Using Recursion This program takes a sentence from the user and reverses that sentence using recursion. This program does not use string to reverse the sentence or store the sentence. Example: Reverse a sentence using recursion Output Enter a sentence: margorp emosewa awesome program This program first prints “Enter…
Read more

C Program to Convert Binary Number to Octal and vice-versa

C Program to Convert Binary Numbers to Octal and vice-versa In this example, you will learn to convert binary numbers to octal and octal numbers to binary manually by creating a user-defined function. Example 1: Program to Convert Binary to Octal In this program, we will first convert binary numbers to decimals. Then, the decimal number…
Read more

C Program to Convert Octal Number to Decimal and vice-versa

C Program to Convert Octal Number to Decimal and Vice-Versa Introduction In this C programming tutorial, we will create a program to convert octal numbers to decimal and vice-versa. Octal and decimal are two different number systems. Octal is base-8, and decimal is base-10. The algorithm, C code, and explanation will cover both conversion processes.…
Read more

C Program to Convert Binary Number to Decimal and vice-versa

C Program to Convert Binary Number to Decimal and Vice-Versa In this tutorial, we’ll explore how to create a C program to convert binary numbers to decimal and vice versa. Binary and decimal are two different number systems commonly used in computer science and mathematics. Binary is base-2, and decimal is base-10. Let’s delve into…
Read more

C Program to Find G.C.D Using Recursion

C Program to Find GCD Using Recursion In this tutorial, we’ll create a C program to find the Greatest Common Divisor (GCD) of two numbers using recursion. GCD is the largest positive integer that divides each of the numbers without leaving a remainder. We’ll employ a recursive algorithm to calculate the GCD efficiently. Let’s dive…
Read more

C Program to Find Factorial of a Number Using Recursion

C Program to Find Factorial of a Number Using Recursion In this tutorial, we’ll explore how to create a C program to find the factorial of a number using recursion. The factorial of a non-negative integer n, denoted by !n!, is the product of all positive integers up to n. The recursive approach provides an…
Read more

C Program to Find the Sum of Natural Numbers using Recursion

C Program: Sum of Natural Numbers using Recursion Recursion is a programming concept where a function calls itself, and it’s often used to solve problems that can be broken down into smaller, identical subproblems. In this blog post, we’ll explore a C program that uses recursion to find the sum of natural numbers. The post…
Read more

C Program to Check Whether a Number can be Expressed as Sum of Two Prime Numbers

C Program to Check Whether a Number can be Expressed as the Sum of Two Prime Numbers In this tutorial, we’ll create a C program to determine whether a given number can be expressed as the sum of two prime numbers. Prime numbers are positive integers greater than 1 that have no positive divisors other…
Read more