Question: Questions: 1 . Apply the program in figure 6 . 1 3 and make it work. 2 . Take the entire string hello my name

Questions:
1. Apply the program in figure 6.13 and make it work.
2. Take the entire string hello my name is Hakan Koyuncu by using scanf() function. (research on google)
#include
int main(){
char str[100];
printf("Enter a string: ");
scanf("%[^
]", str);
printf("You entered: %s
", str);
}
3. Check if a string is palindrome (example: Hannah, radar, etc.)
#include
#include
int main(){
char str[100];
int i, length;
int isPalindrome =1;
printf("Enter a string: ");
scanf("%s", str);
length = strlen(str);
for (i =0; i < length /2; i++){
if (str[i]!= str[length - i -1]){
isPalindrome =0;
break;
}
}
if (isPalindrome){
printf("The string is a palindrome.
");
} else {
printf("The string is not a palindrome.
");
}
}
Homework: Check if the input sentence is a palindrome sentence.(example: "Madam, I'm Adam." when considering palindrome sentence, spaces and punctuation are often ignored.)(hint you can use isalnum() function in ctype.h library)
Questions:
1. Apply the program in figure 6.13 and make it work.
2. Take the entire string hello my name is Hakan Koyuncu by using scanf() function. (research on google)
3. Check if a string is palindrome (example: Hannah, radar, etc.)
4. Homework: Check if the input sentence is a palindrome sentence.(example: "Madam, I'm Adam." when considering palindrome sentence, spaces and punctuation are often ignored.)(hint you can use isalnum() function in ctype.h library)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!