Category: C Programs

C program to calculate the sum of natural numbers (Using for loop)
Introduction This program is used to calculate the sum of first n natural numbers, where n is any value up to the user’s wish to calculate the sum. To understand this program, you all should know about for loop in C Go through the article on the ‘for’ loop written in the C language series…

C Program to Check Whether a Number is Palindrome or Not
Introduction In this C program, we will learn to write a program that will check whether a number is a Palindrome or not. Palindrome means when the reverse of a number is equal to the original number. For example, 96569 is a palindrome, but 99665 is not a palindrome. Go through the C language concepts…

C Program to Calculate the Power of a Number
Introduction In this example, we will explore calculating the power of a number. The user will be asked to enter an integer as the base value and the power value which will be the exponent of the base number. For example, 9 raised to the power 3 means 9*9*9=721, where 9 is the base value…

C Program to Reverse a Number
Introduction In this program, you will learn to reverse the digits of the integer value entered by the user. For example, if the number is 98542, then this code will reverse the number, and the output will be 24589. To understand the program, learn the following basic concepts of C programming 1. C programming operators…

C Program to Display Characters from A to Z Using Loop
Introduction In this program, you will learn to display all the letters of the English alphabet, Using the ‘for’ loop, we will display the letter from A to Z on the screen. To understand this program, you should have knowledge of the following C programming concepts: 1. C if…else statement 2. C for loop 3.…

C Program to display Fibonacci Sequence (Using recursion)
Introduction In this program, you will learn to display the sum of the Fibonacci sequence of first n numbers. The value of n will be entered by the user. Fibonacci sequence always starts from 0,1 i.e., the first two members of this series remain fixed and the next member is the sum of the previous…

C Program to Display Fibonacci Sequence
Introduction In this program, you will learn to display the Fibonacci sequence of first n numbers. The value of n will be entered by the user. Fibonacci sequence always starts from 0,1 i.e., the first two members of this series remain fixed, and the next member is the sum of the previous two members. For…

C Program to Generate multiple Multiplication Tables
Introduction In this program, we will write multiplication tables for different numbers entered by the user. As we all know, writing a multiplication table is a very lengthy task, but C programming makes it very simple for users. Suppose the user wishes to print multiplication tables of some numbers in a serial order. Then this…

C Program to Generate Multiplication Table
Introduction In this program, we will write a multiplication table of any value entered by the user. As we all know, writing a multiplication table is a very lengthy task, but C programming makes it very simple for users. There are many ways in C programming to generate a multiplication table. In this program, we…

C Program to Find Factorial of a Number (Using recursion)
Introduction In this program, you will learn to calculate the factorial of a number. The user will enter a particular value, and then through this program, we will compute its factorial. For example, Factorial of 5 is (! is the symbol for factorial): 5! =5*4*3*2*1=120 Similarly, Factorial of 7 is 7! =7*6*5*4*3*2*1=5040 Factorial of negative…