#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
How can I Draw an ellipse in 3d space and color it by using graph3d?
solve the problem in the programming language C++"if a five digit number is input through the keyboard.Write a program to calculate the sum of its digits(hint: use the modulus operator)
i really need help about this.. write a program to display the set of odd and even numbers separately. find the highest and lowest value of the given numbers.
Implement a command console for changing settings on a particular object. The command console should allow you to enter a string and will return the response (very similar to a terminal session). The commands are as follows: SET propertyname=newvalue will change the target object’s member named “propertyname” to have a value equal to “newvalue”. If the input value is incompatible (i.e. an int being set to a string), print out an appropriate error message. GET propertyname will print out the current value of the target object’s member named “propertyname”. GET * will print out a list of all target object members and their current values. The system should be extensible for future commands and should accept an arbitrary object, such that another developer could insert another object into the system and rely on the command console to get and set the properties correctly.
create a stucture student containing field for roll no,class,year and marks.create 10 student annd store them in a file
How to Split Strings with Regex in Managed C++ Applications?
write a program that reads a series of strings and prints only those strings begging with letter "b"
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?
Write a C/C++ program that connects to a MySQL server and displays the global TIMEZONE.
how to write a program that opens a file and display in reverse order?
write a program using virtual function to find the transposing of a square matrix?
write a function that reverse the elements of an array in place.The function must accept only one pointer value and return void.
write a program that prompt the user to enter his height and weight,then calculate the body mass index and show the algorithm used
Question 1: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the dentist”) and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date. *This Should Be Done IN C++
How to swap two ASCII numbers?