palindrome for strings and numbers----Can anybody do the
prog?

Answer Posted / arup bhattacharya

#include<stdio.h>
#include<conio.h>
void main()
{
int n,r,temp;
int s=0;
clrscr();
printf("enter the number");
scanf("%d",&n);
temp=n;
while(temp>0)
{
r=temp%10;
s=s*10+r;
temp=temp/10;
}
if(n==temp)
printf(number is pallindrome");
else
printf("not pallindrome");
getch();
}

Is This Answer Correct ?    9 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is use of #include in c?

606


What is dangling pointer in c?

629


Should I learn c before c++?

629


please explain every phase in the "SDLC" in the dotnet.

2182


How can you be sure that a program follows the ANSI C standard?

1135






Write a program to produce the following output: 1 2 3 4 5 6 7 8 9 10

15058


Explain how do you generate random numbers in c?

628


Why is it usually a bad idea to use gets()? Suggest a workaround.

915


Describe explain how arrays can be passed to a user defined function

609


What is the difference between local variable and global variable in c?

695


Explain the Difference between the New and Malloc keyword.

690


Given below are three different ways to print the character for ASCII code 88. Which is the correct way1) char c = 88; cout << c << " ";2) cout.put(88);3) cout << char(88) << " "; a) 1 b) 2 c) 3 d) constant

671


A collection of data with a given structure for excepting storing and providing on demand data for multiple users a) linked list b) datastructer c) database d) preprocessor

626


What do you mean by a local block?

635


the number of measuring units from a arbitrary starting point in a record area or control block to some other point a) branching b) recording pointer c) none d) offset

644