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
What is use of #include in c?
What is dangling pointer in c?
Should I learn c before c++?
please explain every phase in the "SDLC" in the dotnet.
How can you be sure that a program follows the ANSI C standard?
Write a program to produce the following output: 1 2 3 4 5 6 7 8 9 10
Explain how do you generate random numbers in c?
Why is it usually a bad idea to use gets()? Suggest a workaround.
Describe explain how arrays can be passed to a user defined function
What is the difference between local variable and global variable in c?
Explain the Difference between the New and Malloc keyword.
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
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
What do you mean by a local block?
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