write program for palindrome

Answer Posted / aishwarya

/*using pointers*/
main()
{
char str[]="MalyalaM";
char *s;
s=str+8;
while(s>=str)
{
printf("%c",*s);
s--;
}
}

Is This Answer Correct ?    10 Yes 18 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the default width for ouputting a long integer using the insertion operator?

965


What is the difference between reference and pointer?

842


What is constructor and destructor in c++?

847


Who made c++?

817


Why do we use iterators?

829


What is a node class in c++?

829


What is object in c++ wikipedia?

758


What is a memory leak c++?

775


If you hear the cpu fan is running and the monitor power is still on, but you did not see anything show up in the monitor screen. What would you do to find out what is going wrong?

807


What is a class template?

812


Explain function overloading and operator overloading.

824


What are the extraction and insertion operators in c++?

764


Explain how an exception handler is defined and invoked in a Program.

859


What does obj stand for?

844


If I is an integer variable, which is faster ++i or i++?

796