check if string is palindrome in c

Solutions on MaxInterview for check if string is palindrome in c by the best coders in the world

showing results for - "check if string is palindrome in c"
Vanessa
09 Jun 2018
1#include <stdio.h>
2#include <conio.h>
3
4void main()
5{
6
7    int n,i,r=0;
8    
9    printf("Enter a number: ");
10    scanf("%d",&n);
11    
12    for(i=n;i!=0;i)
13    {
14        r=r*10;
15        r=r+ i%10;
16        i=i/10;
17    }
18    
19    if(r==n)
20        printf("palindrome");
21    else
22        printf("Not palindrome");
23}
Gabriella
22 Apr 2019
1// this is for string
2
3#include <stdio.h>
4#include <string.h>
5
6void main()
7{
8  char a[100], b[100];
9
10  printf("Enter a string to check if it's a palindrome: ");
11  gets(a);
12
13  strcpy(b, a);
14
15  if (strcmp(a, b) == 0)
16    printf("\nThe string is palindrome.\n");
17
18  else
19    printf("\nThe string is not palindrome.\n");
20
21  getch();
22}
23
Oskar
18 Oct 2019
1#include <stdio.h>
2#include <conio.h>
3
4int palindrome (int num);
5
6void main()
7{
8    int n, ret;
9    printf("Enter the number: ");
10    scanf("%d",&n);
11
12    ret = palindrome(n);
13
14    if (ret == n)
15        printf("\nPalindrome\n");
16    else
17        printf("\nNot Palindrome\n");
18}
19
20int palindrome(int num)
21{
22    int rem, rev=0;
23
24    while (num!=0)
25    {
26        rem = num % 10;
27        rev = rev * 10 + rem;
28        num /= 10;
29    }
30
31    return rev;
32}
33
queries leading to this page
palindrome check in c by reversing string 5cpalindrome in c functionc is palindrome functionstring palindrome i n ccheck a string is palindrome or not in cint palindrome in ccheck if a string is palindrome in cpalindrome without using string function in cwrite a program to check if a number is palindrome or not c 28use loop 29 find a number is palindrome or not in cc program for palindrome stringc is palindromecompare two strings in c without using string function and check palindromemanual palindrome in c stringc program to check if a given string is palindromepalindrome in c program for stringsinteger palindrome cthe given number is palindrome or not palindrome ccheck if number is palindrome in cpalindrome explanation in calgorithm for palindrome number in csequence of palindrome numbers in ccheck the string is palindrome or not in ccheck if a string is a palindrome cpalindrome of string cc program to check if a string is a palindrome without using built in function c program to check if the string is palindrome or not using stackwrite a program to check if the string is palindrome in cchecking for palindrome string in cpalindrome programe in cnumber of palindromes based on length n in ccheck palindrome in cnumber of palindromes in cpalindrome in c with stringpalindrome string in cc program to check if a given string is palindrome or nowrite a program in c to check the number is palindrome or notc palindrome programhow to tell if a number is a palindrome in ccheck whether string is palindrome or not using cpalindrome check in cpalindrome character program in cstring palindrome in cc program to check whether a given number is palindrome using functions palindrome i n cprogram to find string is palindrome or not in cfind palindromic substring in string in cpalindrome logic in cis palindrome check program in cwrite a c program to check a number whether it is palindrome or not write a function to find out longest palindrome in a given string in cprogram to check if a string is palindrome or not in ccheck is number is palindrome in cgiven string palindrome or not in cwrite a c program to check whether a number is palindrome or notprogram to find the palindrome of a number in cpalindrome checker in cpalindrome number program in cc string is palindromeprogram to check palindrome in cc program for palindrome using arrayshow to check if a string is palindrome in c usipalindrome program in c for stringpalindrome algorithm in cwrite a c program to check if a user given number is a palindrome or not palindrome sting in cpalindrome string in cc program to check palindrome or notc program to determine whether a string is palindromecheck palindrome word in cc program check for palindrome numberpalindrome in c with pointer manuallypalindrom of a string in ccheck a string is pallindrome or not in cwrite a program in c to check whether a number is a palindrome or not how to check if string is palindrome in cpalindrome string in c programpalindrome of a string in ccheck if a string is palindrome ccheck whether string is palindrome or not in chow to check the string is palindrome in cprogram for palindrome in cpalindroem no in cc check if palindromealgorithm wap to check user entered number is palindrome or not in chow to make a palindrome program in c using pointerfind palindrome number in chow to check palindrome in cpalindrome integer in cc program for palindromestring is palindrome in cpalindrome c functionpalidrome in chighest value palindrome in cpalindrome check using stack in cudp program to check palindrome in cstring palindrome in c using strrevpalindrome of string in cpalindrome stirng cc program for palindrom stringwhat is string in palindrome in cc program to check whether a given string is palindrome or notprogram to accept string in c and check palindromepaliindrome function in cpalindrome number cprogram to display palindrome in cstack palindrome in cpalindrome program in c using stringsinput string is palindrome or not in c without string functionswrite code to check a string is palindrome or not in cwrite a program in c to findout a string is a palindrome or notcheck if given string is palindrome in cpalindrome number prog in chow to find string is palindrome or not in c loopc program to check palindrome codechefstring palindrome program in c using pointerscheck palindrome sub string in cpalindrome c stringwrite a program in c to accept and check a palindrome string check palindrome in c stringcheck whether the given string is a palindrome or not in cstring palindrome using stack in cpalindrome program in c without using string functionspalindrome program cpalindrome in array in cwrite a c program to check if the user inputed string is palindrome or not using recursionhow to check if string is a palindrome cwrite a c program to check whether a 10 given string is a palindrome or not program for string palindrome in cc program to check palindrome stringpalindrome string c programcode to find palindrome string in cc program to print palindrome words in a stringc program for palindrome using functionwrite a program to check whether a number is palindrome or not in cpalindrome in c using functionwrite a c program to check whether a string is palindrome or not string palindrome in c using functionc program to check if string is palindromecheck for a palindrome string in cstring is palindrome or not c programehow to find if string is a palindrome in c using pointerpalindrome using strrev in cstring palindrome program in c using for looppalindrome in cpalidrom number display in coutput and code of write program for string is palindrome or notc programming palindromewrite a c program to check if the given input string is palindrome or not 2c if palindrome then reverse it c program to check a string is palindrome or notc check if palindrome string using inbuilt functionpalindrome program in string in ccheck palindrome string in cwhy we need to check count 2f2 in palindrome in c programmingpalindrome in string in cc palindrome program stringc program to check whether given string is palindrome or notpalindrome c programpalindeom code in cpalindrome of a string program in cstring palindrome ccheck palindrome number in chow to check whether a string is a palindrome or not in cc program to print palindrome or notpalindrome string program in cnumber is palindrome r not in cpalindrome in c programc program to find palindromeprogram to display word palindrome in csomeone enters a string and check whether is it palindrome or not 2cwhich logic is used in cchecking palindrome in cget a string input from user and check palindrome or not in cpalindrom number in c programmingcheck for string palindrome in cfind palindrome string in cpalindrome code in ccheck if string is palindrome in cc program to check palindrome without using string functionspalindrome means in cmore than one palindrome check cc program to find given string is palindrome or notcheck if string is a palindrome in cpalindrome check function in c how to find palindromes in code cwrite a c program to check whether a string is palindrome checking palindrome 28number 29 in c programfind wheter a string is palindrome or not in cstring palindrome in c using pointerswrite a c program to enter any number and check whether the number is palindrome or not check for palindrome string in cwrite a c program to check an array of string is palindrome or notpalindrome c program codec program palindromepalindrom in c with pointerhow to chekc for palindrome with a string in clongest palindrome in a string in cfonction palindrome en cphrase palindrome in c functionpalindrome meaning in ca c program to check whether a number is palindrome or not c program to check whether the string is palindrome or notpalindrome series program in chow to find palindrome number in cc program for palindrome numbercheck integer palindrome cpalindrom in c with pointer manuallypalindrome c program using for stringc program to check palindromewrite a c program to check if the text is palindrome or not in cchecks whether or not a given unsigned integer is a palindrome in cstring palindrome program in cc program to check if a given string is palindrome or norwrite a c program to test if a string is a palindrome or not using a stack data structurecheck if given character array is palindrome in ccheck for a palindrome in a string in cpalindrome program in cprogram in c to check if a number is palindrome or notprocedure to find string palindrome using stack in cpalindrome c logicc palindrome using functionpalindrome in c using stackwrite a program in c to check whether the given string is a palindrome or nothow to palindrome char in cn number of string palindrome in ccheck if a word is a palindrome in cpalindrome string logic in cword is palindrome in cc program to check string is palindrome or notpalindrome in c stringpalindrome in c with charc program to check number is palindrome or notpalindrome for string in cc program to check string is palindrome or not using stackstring is palindrome or not in cwrite a program to check whether a string is palindrome or not using stack in cpalindrome string program in c without library functionaccept string from user and check whether the string is palindrome or not without considering its case in cfind whether given string is palindroem or not in cpalindrome in c with pointerpalindrome number in c programmingcheck if a number is a palindrome in cc program to check if a given string is palindrome or notcheck string is palindrome or not in cc program for wirting palindromec program to check a number is palindrome or notcheck string palindrome cprogrma in c to check whether a nuber is palindrome or nothow to check if a word is palindrome or not in c check whether string is palindrome or not using c strrev 28 29find palindromic words in string in cpalindrome using user defined function in cpalindrome c3 write a c program to check palindrome numberc program to check palindrome codechef solutioninput string is palindrome or not in cwrite a program in c to check whether a user given number is palindrome or not how to check if number is palindrome in cpalindrome in c without string functioncode in c to find given array is palindrome or notpalindrome in c using pointersc program to check whether a string is palindrome or not using stackpalindrom number display in cpalindrome of a number cwhat is palindrome number in cpalindrome number in ccheck if string is palindrome in c