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

Digital Design, Design a serial 2’s complementer with a shift register and ...

Design a serial 2’s complementer with a shift register and a flip-flop

Describe the features of electronic banking, Question 1: The Banking Ac...

Question 1: The Banking Act provides for banking services through interactive electronic systems. (a) Describe the features of electronic banking. (b) Show the responsibi

Give explanation of user datagram protocol, Explain UDP (User Datagram Prot...

Explain UDP (User Datagram Protocol). UDP utilizes a connectionless communication paradigm. It is an application of using UDP doesn't require preestablishing a connection befor

Features added in message passing interface-2, Q. Show the Features added i...

Q. Show the Features added in message passing interface-2 Input/output Single-sided operations for remote memory access Binding for C++ Dynamic process managem

Sets and bags, Task: Sets and bags In mathematics, the notion of multis...

Task: Sets and bags In mathematics, the notion of multiset (or bag) is a generalisation of the notion of set. A bag is a special kind of container in which the items may be

Determine bhca rating for processor and call completion rate, A call proces...

A call processor in an exchange requires 120 ms to service a complete call. What is the BHCA rating for the processor? If the exchange is capable of carrying 700 Erlangs of traffic

What is wap, What is WAP? WAP is stands for Wireless Application Proto...

What is WAP? WAP is stands for Wireless Application Protocol. It is a global, open standard which gives mobile users access to Internet services by handled devices. Wireless A

What is presentation layer, Q. What is Presentation layer? Presentatio...

Q. What is Presentation layer? Presentation layer: When two hosts are communicating with each other they might use different coding standards and character sets for represent

Should validation occur server- side or client - side, Should validation (d...

Should validation (did the user enter a real date) occur server-side or client-side? Why? Validation will be completed in both sides i.e., at the server side and client side. S

How blocking and non blocking statements get executed, How blocking and non...

How blocking and non blocking statements get executed? Execution of blocking assignments can be viewed just like a one-step process: 1. Evaluate RHS (right-hand side equatio

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