write program for palindrome
Answer Posted / md. arif shahmim
#include<stdio.h>
#include<string.h>
#define size 26
void main()
{
char strsrc[size];
char strtmp[size];
clrscr();
printf("\n Enter String:= "); gets(strsrc);
strcpy(strtmp,strsrc);
strrev(strtmp);
if(strcmp(strsrc,strtmp)==0)
printf("\n Entered string \"%s\" ispalindrome",strsrc);
else
printf("\n Entered string \"%s\" is not
palindrome",strsrc);
getch();
}
| Is This Answer Correct ? | 16 Yes | 23 No |
Post New Answer View All Answers
Describe about storage allocation and scope of global, extern, static, local and register variables?
You want to link a c++ program to c functions. How would you do it?
Explain rethrowing exceptions with an example?
What does the following do: for(;;) ; a) Illegal b) Loops forever c) Ignored by compiler...not illegal
Must accepts "Maestro Cards" Tax for bike should be less than 15 Total number of lanes is more than 10 Must provides monthly pass Write a method: boolean isGoodTollBridge(String[] cardsAccepted, String[] tollTax, boolean hasMonthlyPass, int numberOfLanes); String[] cardsAccepted A String array of names of card types accepted for payment of toll tax, it can be null if the toll does not accept any card String[] tollTax A String array of toll tax chart (say “Train : 300â€Â,â€ÂBullCart : 10â€Â) boolean hasMonthlyPass This parameter defines whether there is any monthly pass available or not int numberOfLanes This parameter defines the number of lanes for each side
What is the use of string in c++?
What is pointer to array in c++?
What is constant in c++ with example?
What is fixed in c++?
Can there be at least some solution to determine the number of arguments passed to a variable argument list function?
Is c++ map a hash table?
What is the sequence of destruction of local objects?
Why isn't sizeof for a struct equal to the sum of sizeof of each member?
Write a Program for read a line from file from location N1 to N2 using command line arguments. Eg:exe 10 20 a.c
What does extern mean in a function declaration in c++?