#include<stdio.h>
#include<conio.h>
void main()
{
char str[10];
int,a,x,sw=0;
clrscr();
printf("Enter a string:");
gets(str);
for(x=0;x<=a;a++);
for(x=0;x<=a;x++)
{
if(str[x]==str[a-1-x])
{
sw=1;
}
else
sw=0;
}
if(sw==10
printf("The entered string is palindrome:");
else
printf("The entered string is not a palindrome:);
}
getch();
}

wht would be the explanation with this written code???

Answer Posted / pushker

this is reverse a string u can check by putting on a value
that..u make this by simple way..
contact me:
yadav.pushker@gmail.com

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

write a program that reads a series of strings and prints only those strings begging with letter "b"

2660


What output does this program generate as shown? Why? class A { A() { cout << "A::A()" << endl; } ~A() { cout << "A::~A()" << endl; throw "A::exception"; } }; class B { B() { cout << "B::B()" << endl; throw "B::exception"; } ~B() { cout << "B::~B()"; } }; int main(int, char**) { try { cout << "Entering try...catch block" << endl; A objectA; B objectB; cout << "Exiting try...catch block" << endl; } catch (char* ex) { cout << ex << endl; } return 0; }

573


Write a (n) algorithm that sorts n distinct integers, ranging in size between 1 and kn inclusive, where k is a constant positive integer. (Hint: Use a kn-element array.)

4437


Write a C/C++ program that connects to a MySQL server and displays the global TIMEZONE.

4568


Code for Two Classes for Doing Gzip in Memory?

2803






can you please write a program for deadlock that can detect deadlock and to prevent deadlock.

2731


How to swap two ASCII numbers?

2437


Write a C++ program without using any loop (if, for, while etc) to print prime numbers from 1 to 100 and 100 to 1 (Do not use 200 print statements!!!)

3260


We need to write the function to check the password entered is correct or not based on the following conditions.. a) It must have atleast one lower case character and one digit. b)It must not have any Upper case characters and any special characters c) length should be b/w 5-12. d) It should not have any same immediate patterns like abcanan1 : not acceptable coz of an an pattern abc11se: not acceptable, coz of pattern 11 123sd123 : acceptable, as not immediate pattern adfasdsdf : not acceptable, as no digits Aasdfasd12: not acceptable, as have uppercase character

3946


how to diplay a external image of output on winxp by using c & c++,

2926


Write a program that print in screen a tree with its height taken from user by entering number of 4 digits and find the odd numbers then calculate the sum of odd numbers so he get the height of tree?

2905


write a program that prompt the user to enter his height and weight,then calculate the body mass index and show the algorithm used

4297


3. Program to find the Sum of give series. a. (1)+(1+2)+(1+2+3)+(1+2+3+4)+……………………………….. b. 1/1+1/9+1/25+1/49+……………...

4343


Write a simple encryption program using string function which apply the substitution method.

5527


develop a program to calculate and print body mass index for 200 employees

2208