Program for Number Palindrome in C

Here you will get program for number palindrome in C. A number is palindrome if it is equal to its reverse. For example 121, 111, 1331 are palindrome numbers. Program for Number Palindrome in C   Output Enter any number:12321 The given number is palindrome

Program for Prime Number in C

Here you will get program for prime number in C. A number that is only divisible by 1 or itself is called prime number. For example, 17 is prime, 6 is not prime, etc. Program for Prime Number in C   Output Enter any number:15 The given number is not prime

Program for Factorial in C

Here you will get program for factorial in C. We can find factorial of any number by multiplying it with all the numbers below it. For example, factorial of 3 will be 6 (3 * 2 * 1). Program for Factorial in C   Output Enter value of n:4 Factorial of 4 is 24

C program to input number of week's day(1-7) and translate to its equivalent name of the day of the week

#include<stdio.h>#include<conio.h> void main(){ int ch; clrscr(); //to clear the screen printf(“Enter number of week’s day(1-7):”); scanf(“%d”,&ch); switch(ch) { case 1: printf(“nSunday”); break; case 2: printf(“nMonday”); break; case 3: printf(“nTuesday”); break; case 4: printf(“nWednesday”); break; case 5: printf(“nThursday”); break; case 6: printf(“nFriday”); break; case 7: printf(“nSaturday”); break; } getch(); //to stop the screen}

C program to find whether a given character is an alphabet,digit or any special character(using ASCII values)

#include<stdio.h>#include<conio.h> void main(){    char ch;    clrscr();    //to clear the screen    printf(“Enter any character:”);    scanf(“%c”,&ch);     if((ch>=’A’&&ch<=’Z’)||(ch>=’a’&&ch<=’z’))        printf(“nYou have entered an alphabet”);    else        if(ch>=’0’&&ch<=’9′)            printf(“nYou have entered a digit”);        else            printf(“nYou have entered a special character”);     getch();    //to stop the screen}