#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

Code for Method of Handling Factorials of Any Size?

2090


Ask the user to input three positive integers M, N and q. Make the 2 dimensional array of integers with size MxN, where all the elements of I (I = 1,…,M) line will be members of geometrical progression with first element equal to the number of line (I) and denominator q.

3491


Given a table of the form: Product Sold on A 1/1/1980 B 1/1/1980 C 1/1/1980 A 1/1/1980 B 1/1/1980 C 2/1/1980 A 2/1/1980 There are 30 products and 10,000 records of such type. Also the month period during which sales happened is given to u. Write the program to display the result as: Product Month No. of copies A January 12 A February 15 A March 27 B January 54 B February 15 B March 10 C January 37

2167


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

2839


write a function that reverse the elements of an array in place.The function must accept only one pointer value and return void.

4108






Given a table of the form: Product Sold on A 1/1/1980 B 1/1/1980 C 1/1/1980 A 1/1/1980 B 1/1/1980 C 2/1/1980 A 2/1/1980 There are 30 products and 10,000 records of such type. Also the month period during which sales happened is given to u. Write the program to display the result as: Product Month No. of copies A January 12 A February 15 A March 27 B January 54 B February 15 B March 10 C January 37

2327


output for printf("printf");

2082


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!!!)

3395


How can I Draw an ellipse in 3d space and color it by using graph3d?

2230


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

4440


write a program that reverses the input number of n.Formulate an equation to come up with the answer.

7172


1+1/2!+1/3!+...+1/n!

2051


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?

3001


write a program to calculate the amount of investment after a period n years if the principal investors was p and interest is calculated using compound interest,formular=a=p(1+r)^n

2474


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

3051