write program for palindrome
Answer Posted / nithya
#include<stdio.h>
#include<string.h>
main()
{
char str1[35];
char str2[35];
clrscr();
printf("Enter the string of words to check for
Palindrome or Not");
scanf("%s",&str1);
strcpy(str2,str1);
strrev(str2);
if(strcmp(str1,str2)==0)
printf("The entered string of words %s are
palindrome",str1);
else
printf("The entered string of words %s are not
palindrome",str1);
getch();
}
Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
Distinguish between new and malloc and delete and free().
What is the meaning of string in c++?
What kind of jobs can I get with c++?
Give 10 points of differences between C & C++.
How does c++ sort work?
Explain how to initialize a const data member.
What do you mean by storage classes?
Which one is a preferred language C or C++? Why?
Is c++ free?
What is srand c++?
Comment on local and global scope of a variable.
Can c++ do everything c can?
Write a program which is required to process the time of a clock in hours and minutes, entered from the keyboard. With this program, there are two requirements for any data entered by a user: 1. The data must be of the correct type (in this case, two ints). 2. The data must be in the correct range: this means that, for the minutes, negative numbers and any number above 59 must be rejected; for the hours, negative numbers and any number above 23 must be rejected. Output error message for invalid data input. Output the time one and a half hour after the time input. i.e. Hour: 22 Min: 32 One and a half hour after 22:32 is 00:02
write a corrected statement in c++ so that the statement will work properly. x = y = z + 3a;
Explain the uses oof nested class?