954,500 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

C program

Write a C program that accepts a string from the user.The program is to determine if entered string is a palindrome or not

nectionplayer
Newbie Poster
3 posts since Nov 2008
Reputation Points: 10
Solved Threads: 0
 

No thanks.

Ezzaral
Posting Genius
Moderator
15,986 posts since May 2007
Reputation Points: 3,250
Solved Threads: 847
 

lol

sillyboy
Practically a Master Poster
686 posts since Mar 2007
Reputation Points: 85
Solved Threads: 64
 

OK, done. Now what?

WaltP
Posting Sage w/ dash of thyme
Moderator
10,506 posts since May 2006
Reputation Points: 3,348
Solved Threads: 944
 
Write a C program that accepts a string from the user.The program is to determine if entered string is a palindrome or not


Why ?

ithelp
Nearly a Posting Maven
Banned
2,230 posts since May 2006
Reputation Points: 769
Solved Threads: 128
 

#include
#include
#define size 25

void main()
{
char strsrc[size];
char strtmp[size];

clrscr();
printf("\n Enter String:= "); gets(strsrc);

strcpy(strtmp,strsrc);
strrev(strtmp);

if(strcmp(strsrc,strtmp)==0)
printf("\n Entered string \"%s\" is palindrome",strsrc);
else
printf("\n Entered string \"%s\" is not
palindrome",strsrc);
getch();
}

gautam610
Newbie Poster
13 posts since Jul 2008
Reputation Points: 5
Solved Threads: 3
 

And now try compiling this on something that isn't outdated and non-standard and see if it compiles....

Furthermore, even dribble like this should be placed in code tags . Learn how to use them.

Nick Evan
Not a Llama
Moderator
10,112 posts since Oct 2006
Reputation Points: 4,142
Solved Threads: 403
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You