C
Programming and Technical
Programming
Functions
Write a program to determine if a string is a palindrome. User will input the string in the Command line
Read Solution (Total 4)
-
- #include
#include
int main(int count,char *s[])
{
int i=0;
char *g;
g=s[1];
while(*g!=' ')
{
g++;
}
g--;
while(s[1] - 7 years agoHelpfull: Yes(1) No(2)
- #include
#include
#include
void main()
{
char nm[100],*p,*q;
int f=0;
clrscr();
printf("Enter a string");
gets(nm);
p=q=nm;
while(*q!=NULL)
q++;
q--;
while(p - 7 years agoHelpfull: Yes(1) No(0)
- #include
#include
void isPalindrome(char str[50])
{
int l = 0;
int h = strlen(str) - 1;
while (h > l)
{
if (str[l++] != str[h--])
{
printf("%s is Not Palindromen", str);
return;
}
}
printf("%s is palindromen", str);
}
int main(int argc, char *argv[])
{
isPalindrome(argv[1]);
isPalindrome(argv[2]);
return 0;
} - 6 years agoHelpfull: Yes(1) No(0)
- #include
#include
int main(int argc,char *argv[])
{
int i,n reverse=0;
if (argc - 7 years agoHelpfull: Yes(0) No(2)
C Other Question