Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


write a program that input four digit no and finds it is
palindrome or not

Answers were Sorted based on User's Feedback



write a program that input four digit no and finds it is palindrome or not..

Answer / karthik p b

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

void main()
{
int n,rev=0,rem, temp,i;

printf(" Enter the 4 digit number :\n");
scanf("%d", &n);

temp = n;
for(i=1;i<=4;i++)
{
rem = n % 10;
n = n/10;
rev = rev * 10 + rem;
}

if(temp == rev)
printf(" Its a palindrome:\n");
else
printf(" Not a palindrome:\n");
getch();
}

Is This Answer Correct ?    1 Yes 0 No

write a program that input four digit no and finds it is palindrome or not..

Answer / abhi

use stack

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More STL Interview Questions

Who created stl?

0 Answers  


wap in c++ which accept a integer array and its size as argument and replaces element having even values with its half and element having odd values with twice its value

1 Answers  


Describe the My Computer and My Documents folders; identify the elements that are present in every Window.

0 Answers  


HOW TO GET "H1B" -VISA 4 USA FOR MY SON?HE HAD COMPLETED "MS"(IT)FROM AUSTALIA 2007.I AM WORKING IN U.S.A.

0 Answers  


What is the use of stl?

0 Answers  


What is a stl vector?

0 Answers  


what is a template?

2 Answers   Amazon, BITS, IBS, Wipro,


i wanted to know about questions about c,c++ , which is required for placements.... im a fresher

0 Answers   NDS,


differentiate between private, public and protected data members of the class using example.

1 Answers  


How the STL's are implemented, What the difference between templates and STL?

1 Answers   Symphony,


What is the stl, standard template library?

0 Answers  


give me the defination of inheritance?

5 Answers   Infosys,


Categories