943,541 Members | Top Members by Rank

Ad:
  • C Discussion Thread
  • Unsolved
  • Views: 779
  • C RSS
Nov 17th, 2008
0

C program

Expand Post »
Write a C program that accepts a string from the user.The program is to determine if entered string is a palindrome or not
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
nectionplayer is offline Offline
3 posts
since Nov 2008
Nov 17th, 2008
0

Re: C program

No thanks.
Moderator
Featured Poster
Reputation Points: 3239
Solved Threads: 838
Posting Genius
Ezzaral is offline Offline
6,756 posts
since May 2007
Nov 17th, 2008
0

Re: C program

lol
Reputation Points: 85
Solved Threads: 64
Practically a Master Poster
sillyboy is offline Offline
686 posts
since Mar 2007
Nov 18th, 2008
1

Re: C program

OK, done. Now what?
Moderator
Reputation Points: 3275
Solved Threads: 890
Posting Sage
WaltP is offline Offline
7,716 posts
since May 2006
Nov 18th, 2008
0

Re: 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
Why ?
Reputation Points: 769
Solved Threads: 128
Banned
ithelp is offline Offline
1,910 posts
since May 2006
Nov 18th, 2008
-2

Re: C program

#include<stdio.h>
#include<string.h>
#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();
}
Reputation Points: 5
Solved Threads: 3
Newbie Poster
gautam610 is offline Offline
13 posts
since Jul 2008
Nov 18th, 2008
0

Re: C program

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.
Moderator
Featured Poster
Reputation Points: 4142
Solved Threads: 394
Industrious Poster
Nick Evan is offline Offline
4,132 posts
since Oct 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C Forum Timeline: Help with struct and double pointer (code inside)
Next Thread in C Forum Timeline: Binary And Decimal Conversions





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC