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

What is the significance of the screen number ''0'', What is the significan...

What is the significance of the screen number '0'? In "calling mode", the special screen number 0 (LEAVE TO SCREEN 0) causes the system to jump back to the last call level.  Th

What are the elements of an instruction, Q. What are the elements of an ins...

Q. What are the elements of an instruction? As the function of instruction is to communicate to CPU what to do it needs a minimum set of communication such as:  What op

The components of i-way infrastructure, What are the components of I-way In...

What are the components of I-way Infrastructure? There are three mechanism of the I-way infrastructure: Consumer access equipment Local on-Ramps Global informa

State of the register, What is the state of the register in Figure  after e...

What is the state of the register in Figure  after every clock pulse if it begins in the 101001111000 state?

What do you mean by processor arrangements, Q. What do you mean by Processo...

Q. What do you mean by Processor Arrangements? It is a very common event in data parallel programming to combine many processors to execute specific tasks. To achieve this obje

What do you mean by work flow automation, What do you mean by work flow aut...

What do you mean by work flow automation? Work Flow Automation: Organizations frequently standardize processes across the association and encourage users to accept them. E

Explain about iframe, Q. Explain about IFRAME? is an HTML 4.0 addition...

Q. Explain about IFRAME? is an HTML 4.0 addition to frames toolbox. Presently only MSIE supports . Unlike frames created employing and

Physical characteristics and access mode of disk drive, Q. Physical charact...

Q. Physical characteristics and access mode of disk drive? Access Time: Access time is time needed between requests made for a read or write operation until the time data are

Dbms, what is cascading rolback?

what is cascading rolback?

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