FREE : [ Study Material ] NDA/SSB Preparation : Check Now!!! | Latest: HR Interview Questions:CHECK | Like Us :

Friday, 21 December 2012

Program to Check Palindrome of a String | C Program


Input



#include<stdio.h>
#include<conio.h>
void main()
{
int i,flag=0;
char a[20],b[20],n;  clrscr();
printf("Enter the String to be checked\t");
gets(a);
n=strlen(a);
for(i=0;i<n;i++)
{
b[n-i-1]=a[i];
}
for(i=0;i<n;i++)
{
if(a[i]!=b[i]) {    flag=1; break; }
}
if(flag==1) printf("\n String is not palindrome");
if(flag==0) printf("\n String is palindrome");
getch();
}


Turbo C




Program to check Palindrome of a Number | C Program


Input


#include<stdio.h>
#include<conio.h>
void main()
{
int num,rev=0,temp;
clrscr();
printf("Enter the number of want to check for palindrome\n");
scanf("%d",&num);
temp=num;
while(temp>0)
{
rev=(10*rev) + (temp%10);
temp=temp/10;
}
if(num==rev)
printf("\nNumber is Palindrome");
else
printf("\n Number is not Palindrome");
getch();
}


Turbo C




Program to calculate factorial of a Number | C program


Input


#include<stdio.h>
#include<conio.h>
void main()
{
int n,i,res=1;
clrscr();
printf("Enter the Number\n");
scanf("%d",&n);
for(i=n;i>0;i--)
{
res=res*i;
}
printf("The Factorial is\n\t%d",res);
getch();
}


Turbo C



Program to check whether a Number is Even or Odd? | C Program


Input



#include<stdio.h>
#include<conio.h>
void main()
{
int num;
clrscr();
printf("Enter the number to be Checked\t");
scanf("%d",&num);
if(num%2==0)
printf("\nNumber is EVEN");
else
printf("\nNumber is ODD");
getch();
}

Turbo C




Infotech Enterprises hiring Btech 2012 Passouts



Infotech Enterprises hiring Btech 2012 Passouts

Company:-Infotech Enterprises
Post:-Assistant Design Engineer
Salary:-2.75 to 3 lakhs
Eligibilitiy:-BE/Btech/ME/Mtech
Stream:-Mechanical

Apply now

UP Primary Teacher 72,637 vacancies 2013 | Apply Online | upbasiceduboard.gov.in



Utter Pradesh Basis Education Board invites online application form for 72,637 vacancies as Primary Teacher Recruitment 2013 on it’s official main portal site www.upbasiceduboard.gov.in.


Total posts : 72,637 vacancies (Estimated)
General  : 36229 Posts
OBC : 19609 Posts
SC : 15259 Posts
ST : 1550 Posts

Last Date to Apply:-27 December 2012

For More details click here

APPLY ONLINE
 

Results

get our extension

Like Us on FB

    Freshers Jobs

    Donate

    DMCA Protected

    You are Visitor Number

    Interview Questions

    SSB Questions

      Authors
    Tinku Singh
    Hitesh Dhanda

    MrNaukri.com - Get Sarkari Jobs, Results, Off Campus Placement Updates © 2012. All Rights Reserved | Back To Top |

    © 2013 A Product of IBC Network