Write a program to check give word is a palindrom or not, Computer Engineering

Write a program to check whether a given word is a palindrome or not?

# include

# include

void main()

{

char word[10];

int length=0,mid,count=0;

clrscr();

printf("\tEnter the Word :\> ");

gets(word); printf("\n\n\n"); while(word[count]!='\0')

{

length++;

count++;

}

mid = length/2;

for(count=0;count<=mid;count++)

{

if (word[count]!=word[(length-1)-count])

{

printf("\t\n\nGiven String is Not a Palindrome");

getch();

exit();

}

}

printf("\t\n\nGiven String is a Palindrome");

getch();

}

 

Posted Date: 6/14/2013 6:44:45 AM | Location : United States







Related Discussions:- Write a program to check give word is a palindrom or not, Assignment Help, Ask Question on Write a program to check give word is a palindrom or not, Get Answer, Expert's Help, Write a program to check give word is a palindrom or not Discussions

Write discussion on Write a program to check give word is a palindrom or not
Your posts are moderated
Related Questions
Expalin the History Of Parallel Computers The researches with and implementations of use of the parallelism started long back in the 1950's by IBM Corporation. The IBM STRETCH

Consider one versus the rest voting used for classifier with three classes {a, b, c}. Given a row of data denoted as x0 suppose that the classifier for a versus the rest predicts t

Synchronous dynamic random access memory (SDRAM) is dynamic random access memory (DRAM) that is initialized with the system bus. Classic DRAM has an asynchronous interface, which m

What is port? What are the types of port available? An I/O interface having of circuitry needed to connect an I/O device to computer bus. One side consists of a data path with

Address 192.5.48.3 belongs to? Address 192.5.48.3 belongs to class C.

Stack is a portion of RAM used for saving the content of Program Counter and common purpose registers. LIFO stacks, also called as "push down" stacks, are the conceptually easi

Q. Evaluate Physical address of top of stack? Value of stack segment register (SS) = 6000h Value of stack pointer (SP) which is Offset = 0010h  So Physical address of top

Parallelism based on Granularity size Granularity:  Granularity or Grain size is a determine which measure how much computation is devoted in a process.Granularity size is

what are the domains of artificial intelligence

The Concept of Process Unofficially a process is a program in execution subsequent to the program has been loaded in the main memory. Though a process is more than just a progr