What would you like to do?

Write a C program to check whether the string is palindrome or not?

already exists.

Would you like to merge this question into it?

already exists as an alternate of this question.

Would you like to make it the primary and merge this question into it?

exists and is an alternate of .

cls
input "enter a string=";s$
l=len(s$)
for i = l to 1 step-1
c$=mid$(s$,i,l)
next i
r$=c$+r$
if r$=c$ then
print "no. is palindrome"
else
print "no. is not palindrome"
endif
end
2 people found this useful
Thanks for the feedback!

Program to check that given string is palindrome or not in C?

/*To check whether a string is palindrome*/includeinclude void main () { int i,j,f=0; char a[10]; clrscr (); gets(a); for (i=0;a[i]!='\\0';i++) { } i--; for (j=0;a[j]!='\\0';

Write a C program to check a string is a palindrome or not?

include   #include   void main()   {   char string,string1;   printf("enter the string:\\n");   scanf("%s",&string);   strcpy(string1,string); 

Write a Java program to find whether a given string is a palindrome or not?

Answer 1:   private static final boolean isPalindrome(final String str) { return str.equals((new StringBuilder(str)).reverse().toString()); }   Answer 2:   impo

Write a program to check the given number is palindrome or not in vb?

Private Sub Command1_Click() Dim x, s, n, a As Integer n = Val(Text1.Text) a = n s = 0 Do While (n > 0) x = n Mod 10 s = s * 10 + x n = n / 10 Loop If (a =

Shell script to check if a string is a palindrome?

len=0 i=1 echo -n "Enter a String: " read str len=`echo $str | wc -c` len=`expr $len - 1` halfLen=`expr $len / 2` while [ $i -le $halfLen ] do c1=`echo $str|cut -c

Write a c program to check whether a number is binary or not?

include void main() { int n; clrscr(); printf("enter a no."); scanf("%d",&n); if(n%100||n%101) printf("yes binary"); else printf("not binary"); getch();

Program to check whether a number is a palindrome or not using functions?

include #include main() { int reverse_check(int n); int n; printf("enter the number"); scanf("%d",&n); if(reverse_check(n)==n) printf("the entered number is a palindrome

How do you write a program in C to check whether a number is a palindrome or not?

The simplest method is to reverse the digits of the original number and check to see if the reversed number is equal to the original. This is not an efficient way of doing it

How do you write a Program in java to check whether it is a magic number or not?

import java.io.*;   class MagicNumber   {   public int divide(int x)   {   int a,b=0;   for(int i=x;i>0;i/=

Check whether the string is palindrome or not without using library functions?

void main()   { char a[30],b[30];   int i,j,f=1;   printf("\\nEnter a string");   gets(a);   for(i=0;a[i]!=\\0;i++);   for(j=0;i!=