palindrome in c using function

Solutions on MaxInterview for palindrome in c using function by the best coders in the world

showing results for - "palindrome in c using function"
Isaure
03 Nov 2020
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}
Michelle
22 Nov 2016
1#include <stdio.h>
2int main() {
3    int n, reversedN = 0, remainder, originalN;
4    printf("Enter an integer: ");
5    scanf("%d", &n);
6    originalN = n;
7
8    // reversed integer is stored in reversedN
9    while (n != 0) {
10        remainder = n % 10;
11        reversedN = reversedN * 10 + remainder;
12        n /= 10;
13    }
14
15    // palindrome if orignalN and reversedN are equal
16    if (originalN == reversedN)
17        printf("%d is a palindrome.", originalN);
18    else
19        printf("%d is not a palindrome.", originalN);
20
21    return 0;
22}
23
24
Tom
22 Jul 2018
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 in c functionc is palindrome functionstring palindrome i n ccheck a string is palindrome or not in cvalid palindromepalindrome examples wordspalindrome sentenceint palindrome in cpalindrome characterfind differene of palindrome numbers in cc is palindromec program for palindrome stringfind a number is palindrome or not in cpalindrome 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 cnumber is palindromepalindrome numberdefinition of palindromepalindrome numberspalindrome programe in cnumber of palindromes based on length n in cpalindrome fucntioncheck palindrome in cnumber of palindromes in cpalindrome in c with stringpalindrome string in cpalindrome strings exampleswrite a program in c to check the number is palindrome or notc palindrome programhow to tell if a number is a palindrome in cpalindrome codepalindrome check in cpalindrome character program in cstring palindrome in cwrite a programme to check given number is palindrom or not in cc program to check whether a given number is palindrome using functions program to find string is palindrome or not in cpalindrome i n cpalindrome exampleshow to find the number is prime palindrome or not in cpalindrome logic in cis palindrome check program in cwrite a c program to check a number whether it is palindrome or not program to check if a string is palindrome or not in ccheck is number is palindrome in cpalindromic wordslarge palindrome wordsgiven string palindrome or not in cpalindrome meaningfind given number is prime palindrome or not in c programpalindrome englishprogram to find the palindrome of a number in cpalindrome checker in cpalindrome numbers 3fword palindromeswhat is this start at the bottom and read each line backward 2c saying all the important characters 3fprogram to check palindrome in cc program for palindrome using arrayspalindrome program in c for stringpalindrome string in cpalindrome algorithm in cpalindrome sting in cwhat defines a palindromec program to check palindrome or notlist of palindromeswhat do you mean by palindromecheck palindrome word in cc program check for palindrome numberpalindrome in c with pointer manuallywrite a program in c to check whether a number is a palindrome or not palindrome string in c programpalindrome of a string in cpalindrome defintioncheck 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 cwhta is palindromepalindroem no in cc check if palindromealgorithm wap to check user entered number is palindrome or not in cpalindrome number program in cfind palindromeswhat is it called when a word is the same backwardshow to make a palindrome program in c using pointera program in c to check a palindrome phrasefind palindrome number in chow to check palindrome in cpalindrome integer in cmeaning of palindromec program for palindromeword forward and backward readpalindrome wordspalidrome 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 cc program to check whether a given string is palindrome or notprogram to accept string in c and check palindromewhat is palindrome numberpaliindrome function in cpalindrome number cprogram to display palindrome in cstack palindrome in cc program for longest palindrome in a stringbioternary same words from both sidesnumber palindromecheck if given string is palindrome in cpalindrome number prog in cdefine palindromelong palindromec program to check palindrome codechefnumber is palindrome or notpalindrome c stringpalindrome integerwrite a programme to check given number is palindrome or not using function in cshow me palindromespalindrome program in c without using string functionspalindrome program cpalindrome in array in cpalindromes numberspalindrome algorithmec program to check palindrome stringwrite a c program to check whether a 10 given string is a palindrome or not program for string palindrome in cpalindrome indexwhart is palindromec program for palindrome using functionpalindromefind given number is prime palindrom or not in c programewhats a palindromepalindrome definitionpalindrom number display in ca palindrome isstring palindrome in c using functionpalindrome checksentence with palindrome wordsis palindromecheck for a palindrome string in cstring is palindrome or not c programehow to find if string is a palindrome in c using pointerpalindrome in cpalindrome using strrev in cstring palindrome program in c using for looppalindrome algorithmpalindorme string namelong palindrome sentencepalidrom number display in cpalindrome in c using functionc programming palindromepalindromes examplec program to check a string is palindrome or notc check if palindrome string using inbuilt functioncheck palindrome string in cwhy we need to check count 2f2 in palindrome in c programmingpalindrome in string in cc program to check whether given string is palindrome or notpalindrome c programpalindeom code in cpalindrome check palindrome number in chow to check whether a string is a palindrome or not in cwhat is a palindrome palindrome schemepalindrome string program in cpalendrom textlong words that are palindromesnumber is palindrome r not in cpalindrome in c programc program to find palindromechecking palindrome in cthe meaning of palindromepalindrom number in c programmingpalindrome meansfind palindrome string in cpalindrome code in ccheck if string is palindrome in cis 27a 27 palindromepalindrome 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 programfacts about palindromepalindrome examplewrite a c program to enter any number and check whether the number is palindrome or not racecar word backwardspalindrome c program codepalindrome exemplec program palindromepronounce palindromepalindrome of a numberpalindrom in c with pointerlongest palindrome in a string in cwhat is a palindrome numberinteger palindrome in cfonction palindrome en ccheck palindromecreate palindromepalindrome meaning in cphrase palindrome in c functiona c program to check whether a number is palindrome or not palindrome series program in chow to find palindrome number in cc program for palindrome numbercheck integer palindrome cpalindrom in c with pointer manuallypalindrome mc program to check palindromeword palindrpmeswhat is a 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 cpalindrome functioncpalindrome ordecheck if given character array is palindrome in cpalindrome program in cpalindrome meaning computerpalindrome exampleprogram in c to check if a number is palindrome or notpalindrome c logicc palindrome using functionpalindrome in c using stackwrite a program in c to check whether the given string is a palindrome or notprint palindrome in chow to palindrome char in c10 alphabet pallendromecheck if a word is a palindrome in cpalindrome string logic in cpalindrom numberspalindrome in c stringpalindrome in c with charstring is palindrome or not in c1 define palindrome what is palindromefind whether given string is palindroem or not in cwhat words are spelled the same backwardspalindrome in c with pointerpalindrome number in c programmingproperties of a palindromewrite a program in c to check whether a string is a palindrome or not check if a number is a palindrome in ccheck 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 cool palindrome sentencespalindrome meanpalindrome using user defined function in cpalindrome cc program to check palindrome codechef solutionpalindrome nopalindrome atcodrehow to check if number is palindrome in cpalindrome onlinecode in c to find given array is palindrome or notwhats is a palindromepalindrome in c using pointerspalindrome number palindrome c functionpalindrome of a number cwhat is palindrome number in cpalindrome number in cpalindrome in c using function