C Program Functions with Parameters and No Return Values Create a function named palindrome that asks the user a string input if called. If the string is a palindrome, print “{input} is a palindrome!”, otherwise print “{input} is not a palindrome!”   In the main function, call the palindrome function. Input 1. One line containing a single string Output Enter a string: racecar racecar is a palindrome!

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter7: User-defined Simple Data Types, Namespaces, And The String Type
Section: Chapter Questions
Problem 8PE: Write a program that reads in a line consisting of a students name, Social Security number, user ID,...
icon
Related questions
Question

C Program

Functions with Parameters and No Return Values

Create a function named palindrome that asks the user a string input if called. If the string is a palindrome, print “{input} is a palindrome!”, otherwise print “{input} is not a palindrome!”

 

In the main function, call the palindrome function.

Input

1. One line containing a single string

Output

Enter a string: racecar
racecar is a palindrome!
2. Functions With Parameters and
No Return Values Practice II
by CodeChum Admin
Create a function named palindrome that asks the user a string
input if called. If the string is a palindrome, print "(input) is a
palindrome!", otherwise print "(input) is not a palindrome!"
In the main function, call the palindrome function.
Input
1. One line containing a single string
Output
Enter a string: racecar
racecar is a palindrome!
main.c
<> +16
Test Cases
Pun Tests
Constraints
O Constraint 1
This code must call the function inside the main
Test Cases
O Test Case 1
Your Output
No Output
Expected Output
Enter a string: racecar
racecar is a palindrome!
O Test Case 2 Hidden
O Test Case 3 Hidden
Transcribed Image Text:2. Functions With Parameters and No Return Values Practice II by CodeChum Admin Create a function named palindrome that asks the user a string input if called. If the string is a palindrome, print "(input) is a palindrome!", otherwise print "(input) is not a palindrome!" In the main function, call the palindrome function. Input 1. One line containing a single string Output Enter a string: racecar racecar is a palindrome! main.c <> +16 Test Cases Pun Tests Constraints O Constraint 1 This code must call the function inside the main Test Cases O Test Case 1 Your Output No Output Expected Output Enter a string: racecar racecar is a palindrome! O Test Case 2 Hidden O Test Case 3 Hidden
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Types of Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr