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

Assignment Help:

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();

}

 


Related Discussions:- Write a program to check give word is a palindrom or not

State about the data glove, State about the Data Glove  Data glove is u...

State about the Data Glove  Data glove is used to grasp a "virtual" object. The glove is constructed with a series of sensors that detect hand and finger motions. Electromagnet

How to apply color and style, Q. How to Apply Color and Style? 1.  In f...

Q. How to Apply Color and Style? 1.  In first text description layout cell, select heading text from the word "Fly" through the word "Mountains." 2.  In Property inspector,

Explain is cgi a script or a program, The distinction is semantic. Traditio...

The distinction is semantic. Traditionally, compiled executables (binaries) are known as programs, and interpreted programs are usually known as scripts. In the context of CGI, the

Find out the excess code of decimal number, The excess 3 code of decimal nu...

The excess 3 code of decimal number 26 is ? Ans. (26) 10 in BCD is (00100110) BCD Add 011 to all BCD 01011001 for excess - 3

Combinational logic circuits, A circuit can be designed to perform manydiff...

A circuit can be designed to perform manydifferent functions e.g.a circuit has 3 inputs A, B and C and 3 outputs:Output X is logic level 1 (or 'high') if one or moreinputs are at l

Properties of electronic cash, Properties : 1.  Monetary Value: Monetar...

Properties : 1.  Monetary Value: Monetary value must be backed by also cash, bank - authorized credit cards or bank certified cashier's cheque. 2.  Interoperability: E-cash

Explain scripts and libraries introduction, Scripts A script within Rati...

Scripts A script within Rational Robot is a file that haves a sequence of SQABasic code. The extension of the file is always ".REC". Typically the script have an automated testc

Define briefly about extranet, Define briefly about Extranet. Extrane...

Define briefly about Extranet. Extranet: Extranet is Extension of an Intranet which makes the latter available to outside companies or individuals along with or without

Define dma, Define DMA. The transfer of data among a fast storage devic...

Define DMA. The transfer of data among a fast storage device such as magnetic disk and memory if often limited by the speed of the CPU. Removing the CPU from the path and letti

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd