palindrome program in c

#include <stdio.h>
#include <conio.h>

void main()
{

    int n,i,r=0;
    
    printf("Enter a number: ");
    scanf("%d",&n);
    
    for(i=n;i!=0;i)
    {
        r=r*10;
        r=r+ i%10;
        i=i/10;
    }
    
    if(r==n)
        printf("palindrome");
    else
        printf("Not palindrome");
}

3.5
2
Phoenix Logan 186120 points

                                    	bool isPlaindrome(string s)
	{
	   int i=0;
	   int j=s.length()-1;
	   while(i&lt;j)
	   {
	       if(s[i]==s[j])
	       {i++;
	   j--;}
	   else break;
	   }
	   if (i==j || i&gt;j) return 1;
	   else return 0;
	}

3.5 (2 Votes)
0
4.25
4
Awgiedawgie 440215 points

                                    // this is for string

#include &lt;stdio.h&gt;
#include &lt;string.h&gt;

void main()
{
  char a[100], b[100];

  printf(&quot;Enter a string to check if it's a palindrome: &quot;);
  gets(a);

  strcpy(b, a);

  if (strcmp(a, b) == 0)
    printf(&quot;\nThe string is palindrome.\n&quot;);

  else
    printf(&quot;\nThe string is not palindrome.\n&quot;);

  getch();
}

4.25 (4 Votes)
0
4
8
Rubixphys12 15320 points

                                    #include &lt;stdio.h&gt;
#include &lt;string.h&gt;
int main()
{

     char str[80];
     int length;
     printf(&quot;\nEnter a string to check if it's a palindrome: &quot;);
     scanf(&quot;%s&quot;, str);     // string input
     length = strlen(str); // finding the string length
     int i, j, count;
     for (i = 0, j = length - 1, count = 0; i &lt; length; i++, j--)
     {
          // matching string first character with the string last character
          if (str[i] == str[j])
          {
               count++; // if character match, increasing count by one.
          }
     }
     if (count == length) // if count == length, then the string is a palindrome.
     {
          printf(&quot;'%s' is a palindrome.\n&quot;, str);
     }
     else // otherwise the string is not a palindrome.
     {
          printf(&quot;'%s' is not a palindrome.\n&quot;, str);
     }
     return 0;
}

4 (8 Votes)
0
4.33
3
Awgiedawgie 440215 points

                                    #include &lt;stdio.h&gt;
int main() {
    int n, reversedN = 0, remainder, originalN;
    printf(&quot;Enter an integer: &quot;);
    scanf(&quot;%d&quot;, &amp;n);
    originalN = n;

    // reversed integer is stored in reversedN
    while (n != 0) {
        remainder = n % 10;
        reversedN = reversedN * 10 + remainder;
        n /= 10;
    }

    // palindrome if orignalN and reversedN are equal
    if (originalN == reversedN)
        printf(&quot;%d is a palindrome.&quot;, originalN);
    else
        printf(&quot;%d is not a palindrome.&quot;, originalN);

    return 0;
}

4.33 (3 Votes)
0
3
1
Awgiedawgie 440215 points

                                    #include &lt;stdio.h&gt;
#include &lt;conio.h&gt;

int palindrome (int num);

void main()
{
    int n, ret;
    printf(&quot;Enter the number: &quot;);
    scanf(&quot;%d&quot;,&amp;n);

    ret = palindrome(n);

    if (ret == n)
        printf(&quot;\nPalindrome\n&quot;);
    else
        printf(&quot;\nNot Palindrome\n&quot;);
}

int palindrome(int num)
{
    int rem, rev=0;

    while (num!=0)
    {
        rem = num % 10;
        rev = rev * 10 + rem;
        num /= 10;
    }

    return rev;
}

3 (1 Votes)
0
Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
palindrome explanation in c check palindrome string in c check palindrome word in c check whether string is a palindrome how to find if string is a palindrome in c using pointer palindrome checker in c palindrome check function in c c program for palindrome string palindrome series program in c check palindrome efficient way string palindrome in c using function program to find the palindrome of a number in c the given number is palindrome or not palindrome c Valid Palindrome I palindrome string logic in c how to make a palindrome program in c using pointer Write a C program to check whether a 10 given string is a palindrome or not. how to check the string is palindrome in c check if a string is palindrome c c program for palindrome using function palindrome program in c without using string functions palindrome check in c by reversing string\ palindrome check in c is palindrome check program in c palindrome integer in c how to find palindromes in code C c program to check palindrome codechef solution c program to check palindrome codechef Write a C program to enter any number and check whether the number is palindrome or not. palindrome check using stack in c test cases in palindrome palindrome c program c program for palindrome number palindrome code in c 9. Check Palindrome Write a program in C to check whether a number is a palindrome or not. palindeom code in c palindrome string in c program check string is palindrome or not in c c check if palindrome string using inbuilt function c palindrome using function c program for palindrome using arrays palindrome using user defined function in c palidrome in c palindrom number in c programming how to check whether a string is a palindrome or not in c generating a string of size n made by character a b c that is not palindromic test cases for palindrome number palindrome of string in c algorithm WAP to check user entered number is palindrome or not in c palindrome in c with string Write a C program to check whether a string is palindrome. string palindrome using stack in c highest value palindrome in c palindrome checker website CHECKING PALINDROME(NUMBER) in c program palindrome of a string in c how to check wheather number is palindrome or not string palindrome in c using strrev how to get palindrome number c program to find given string is palindrome or not c program to check whether a given string is palindrome or not Write a program in C to check whether the given string is a palindrome or not count palindrome c program to check a string is palindrome or not c program to find palindrome sequence of palindrome numbers in c number is a palindrome c palindrome program FIND WHETHER GIVEN string is palindroem or not in C read palindrome number fastest way to find if a number is palindrome palindrome in c without string function code in c to find given array is palindrome or not find a number is palindrome or not in c check a string is palindrome or not in c Palindrome CheckerPassed how to check whether a given number is palindrome or not paliindrome function in c palindrome checker dp c check if palindrome palindrome character program in c how to find palindrome number in c make my name palindrome how to check if a word is palindrome or not in c palindrome using strrev in c program in c to check if a number is palindrome or not palindrome finder program to accept string in c and check palindrome fastest way to check if a number is palindrome check for a palindrome string in c count palindrome in sentence palindrome in string in c program to check if a string is palindrome or not in c how to palindrome char in c program for string palindrome in c program for palindrome in c string palindrome program in c using for loop c program to check palindrome or not fonction palindrome en c string palindrome i n c palindrome i n c palindrome string in c Check whether the given string is a palindrome or not. in c check is number is palindrome in C how to check palindrome number check if string is palindrome in c palindrome in c using function how to find a palindrome programm to recognise palindrome number in c program to find given number is palindrome or not in c palindrome function C program for palindrome number in c how to find a palindrome number in c explication palindrome algorithm for palindrome number in c palindrom eprogram in c how to check if the number is palindrome check palindrome number in c string palindrome sarys c program to check palindrome using array check for palindrome in c c program for palindrome WAP to find whether the number is a palindrome number. IN C how to check if string is palindrome in c palindrom in c string is palindrome in c palindrome in c using stack check palindrome algorithm palindrome program in c using function palindrome string of numbers in c palindrome string of number in c checking whether a string can form palindrome palindeome number in c how to conver to a palindrome palindrom number using c string palindrome c palindrome language c valid palindrome solutions C Program to Check if a Given String is Palindrome or no c program to check palindrome number explain palindrome program in c how to check if string is a palindrome create palindrome in c language check palindrome ppgh how to write palindrome program fuction call command line program in c check for palindrome string in c Palindrome number. palindrome in c code algorithme palindrome en c check palindrome prime Write a C program to check if a user given number is a palindrome or not. c code for palindrome check for string palindrome in c How do you check if a given string is a palindrome? c program to print palindrome or not string is palindrome or not in c find palindrome using in c palindrome or not in c how to check for palindrome is palindrome solutiontions palindrome program in c briefly explanation logic of palindrome program in c explanation how to check if string is palindrome c program to check palindrome string palindrome string in c palindrome program in c using strings palindrome program in c for string palindrome c program using for string c program to arrange in palindrome check palindrome in c C Program to Check Whether a Number is Palindrome or Not c program palindrome IS NUMBER PALINDROM C check whether the given number is a palindrome in c Check string Palindrome numner palindrome in c string palindrome in c palindrome number in c what is palindrome number generate palindrome of given length generate palindromes of given length number palindrome in c count number of palindromes possible code to find palindrome string in c check if a number is a palindrome c program to check whether the string is palindrome or not c program to check if string is palindrome palindrome of a string program in c palindrome test c palindrome string program in c palindrome number program in c Check Palindrome String palindrome in c string how to check the given number is palindrome or not in c Write a C program to check whether a number is palindrome or not detect palindrome find if string is palindrome conditions of a palindrome strong palindrome number string palindrome program in c possible palindrome check palindrome function is palindrome check palindrome test cases is palindrome test cases all palindrome numbers print Palindrome code to check a palindrome palindrome check quizforexam how to find a palindrome number what is Palindrome Checker palindrome check question Program to check whether number is Palindrome or not. can there be a palindrome in number check if palindrome is possible palindrome means numerical palindrome how to get paliondrome Count the number of palindrome find all the palindrom using character find palindrome palindrome algorithm prograam to check palindrome make number palindrome whas it palindrome online test palindrome test for palindrome number palindrome ,symentry how to check if its possible to create palindrome wiht a palindrome check array how to find a palindrome of a number number palindrome check how to check if a number is palindrome check if string is palindrome check whether the number is palindrome or not palindrome checker online check wether a number is palindrome or not check whether it is palindrome or not is a palindrome check palindrome online UART Palindrome Checker is this a palindrome check palindrome codesignal check if sentence palindrome Given the string, check if it is a palindrome. How do you check if a given String is Palindrome or not? palindrome checker with chart at determine if it is possible to make a palindrome or not finding palindrome tester w is a palindrome what is palindrome Valid Palindrome Solution small basic palindrome check different ways to make a palindrome check number is palindrome or not Count Palindromes count palindrome number a palindrome palindrome in palindrom checker in stl what is a palindrome number Test if a string is a palindrome how to get palindrome all palindrome number in a number check for palindrome string what is a palindrome palindrome recherche palindrome palindrome function scheme test for palindrome scheme calculate a number is a palindrome check palindrome recursive c++ palindrome program in c 15. Write a C program to check whether an entered string is palindrome or not. palindrome c example of palindrome checking palindrome in c++ palindrome or not in 8086 how to check palindrome in c find palindome number how can we find a number is palindrome or not is palindrome sequence of integers from keyboard form a palindrome check c C progamming panildome how to check palindrome check if a number is a palindrome javascript even palindrome check if integer is palindrome javascript c palindrome c function that checks for palindrome Find whether the given number is palindrome or not. palindrome alp how to see if number is palindrome check for a palindrome inc++ palindrome checker c is palindrome is strin g or not check if number is palindrome Valid Palindrome string palindrome example program to check if its palindrome or not javascript check if palindrome number js how to check if number is palindrome check if a number is palindrome efficient ways know if number is palindrome to check palindrome palindrome checker how to check string is palindrome or not Palindrome check is palindrome in c palindrome number palindrome in c* palindrome in c To check palindrome number check if a no os palindrome how to check palindrome nuber how to check if num is same as reverse num how to read a palindrome integer palindromic number logic to check the palindrome how to check number is palindrome or not check a number is palindrome or not how to test palindrome in c javascript how to tell if number is palindrome how do you find the palindrome c program to check palindrome check for number palindrome as fast as possiblle check if a number is a palindrome using javascript how to use % to find a palindrome check if palindrome palindrom string how to check if a number is a palindrome string palindrome check palindrome
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source