C Program to check Leap Year

his program checks whether the input year is leap year or not. Example: Program to check Leap Year You can check whether a year is leap or not by using this mathematical logic:Leap Year:If a year is divisible by 4, 100 and 400 then it is a leap year.If a year is divisible by 4 […]

C Program to Find ASCII value of a Character

ASCII value represents the English characters as numbers, each letter is assigned a number from 0 to 127. For example, the ASCII value for uppercase Q is 81. Example 1: Program to display ASCII value of a character entered by user This program takes the character entered by user and displays the ASCII value of […]

C Program to check if number is even or odd

If a number is exactly divisible by 2 then its an even number else it is an odd number. In this article we have shared two ways(Two C programs) to check whether the input number is even or odd. 1) Using Modulus operator(%) 2) Using Bitwise operator. Program 1: Using Modulus operator /* Program to […]

C Program to find Palindrome numbers in a given range

In the last tutorial we have learnt how to check if a number is palindrome or not. In this tutorial we will learn how to find palindrome numbers in a given range. C Program – Generating palindrome numbers in a given range #include<stdio.h> int main(){ int num, rem, reverse_num, temp, start, end; printf(“Enter the lower limit: […]

C Program to check Armstrong number

A number is called as Armstrong number if sum of cubes of digits of number is equal to the number itself. In the below C program, we are checking whether the input number is Armstrong or not. #include<stdio.h> int main() { int num,copy_of_num,sum=0,rem; //Store input number in variable num printf(“\nEnter a number:”); scanf(“%d”,&num); /* Value […]