c programming examples with output

Armstrong Number in C

Armstrong number in C | Here we will develop the C program to check number is Armstrong number or not? A positive integer is called Armstrong number of order n if, abcd…. =  an + bn + cn + dn + …. For Example :- 15313 + 53 + 33 = 1 + 125 + 27 = 153So, 153 is an Armstrong number of order

Armstrong Number in C Read More »

Perfect Number Program in C

In this post, we will write the Perfect number program in C. We will also write a program to check the perfect number in a given range. Perfect number:- A number whose factors sum, except itself equals the same number. Example:- 6Factors of 6 (except itself) are 1,2,3.The Sum of these factors 1+2+3 = 6

Perfect Number Program in C Read More »

Palindrome Number Program in C

Palindrome number program in C. Here, we will develop the palindrome number program in C. The palindrome number is based on Reverse of a number. We will also find the palindrome number in the given range. Palindrome number:- If the Reverse of a number is equal to the same number then the number is called a palindrome number.

Palindrome Number Program in C Read More »

Prime Number Program in C

Prime number program in C | Number having only two factors ( 1 and itself ) called Prime number. Example:- 5, 7, 11, 13… The problem to write C program to find the prime number is based on to find factors of a number. Note:- We don’t have negative prime numbers. A positive integer is prime

Prime Number Program in C Read More »

Sum of Series Program in C

In this tutorial we will write sum of series program in C language. Some series as 1+2+3+4+5+…+n, 1 + 1/2 + 1/3 + 1/4 + 1/5 + 1/6 +……+ 1/n and 1 + 1/(2*2) + 1/(3*3) + 1/(4*4) + ….. + 1/(n*n) Sum of series in C 1+2+3+4+5+..+N Program Description:- Display sum of series 1+2+3+4+5+..+n

Sum of Series Program in C Read More »

C Program Without Main() Function

Have you ever thought that a C program can be written without the main() function? It’s a quite interesting question. We are taught in almost every book that main() is the entry point of program execution. So, every program must have a main somewhere. main will usually call other functions to help perform its job,

C Program Without Main() Function Read More »