
Concept explainers
Hello. Please answer the following C
*If correctly fulfill and answer all of the directions correctly, I will give you a thumbs up. Thanks.
—------------------------------------------------------------------------------------------------------------------
Question - Instructions:
** For the following question and its steps, do not use string.h and all functions in this library.
Step 1. Write a function to reverse a string.
- Function name: reverse_str
- Return type: void
- Parameter list: a pointer to a char
- Please don’t print the array backward.
- Don’t use another array to make the string reversed. You should reverse the string in place.
- Function Description: This function reverses a string by swapping the first character by the last character of the string and continuing with the second character and one character to the last and so on. Make sure don't repeat this procedure up to the size of the string. Otherwise, you will get the same string. To make sure your function works well don't try palindrome strings like RACECAR.
Step 2. Write a function to find the size of a string.
- Function name: size_str
- Return type: int
- Parameter list: a pointer to a char.
- Function Description: Each string has a '\0' or null character(ASCII code of 0) at the end. You can use this property to find the size of a string.
Step 3: Write the main function, define a string and call reverse_str to reverse the string and determine if the string is a palindrome or not?
Main Function Sample:
#include <stdio.h>
int main()
{
char str[] = "Your String";
int size;
size = size_str(str)
//print the size of str
reverse_str(str);
//print the reverse of str
return 0;
}
void reverse_str(char *str)
{
//Code it.
}
int size_str(char *str)
{
//Code it.
}


Step by stepSolved in 5 steps with 3 images

- Hi, I need to solve this problem with C++ programming language using Visual Studio. Thank you.arrow_forward3. Which among the following shows a valid use of the Direction enumeration as a parameter to the moveCharacter function? Select al that apply. enum Direction { case north, south, west, east}func moveCharacter(x: Int, y: Int, facing: Direction) {// code here} moveCharacter(x: 0, y: 0, facing: .southwest) moveCharacter(x: 0, y: 0, facing: Direction.north) moveCharacter(x: 0, y: 0, facing: .south) moveCharacter(x: 0, y: 0, facing: Direction.northeast)arrow_forward"Develop a Java function named display_album_info that prints details about an album titled 'Euphoric Symphony. The function should output the following information: Artist's name and release year. Brief description of the album's theme or concept. Tracklist with song titles and durations. Musical genre and target audience. Average rating on a scale of 1 to 5. Memorable lyrics or standout musical moments. Contact information for inquiries (email: music@euphoricsymphony.com, phone: 555-4321). Call the function to display the album information."arrow_forward
- Can you write the code in C++ please?arrow_forwardplease look at the screenshot instructions to help me create a flowchart of this c++ code ,also you dont need to do the other tasks just help me to create a flowchart regarding the instructions given, thank youarrow_forwardExercise 3 – Roman Numerals Exercise Tasks: Create a visual studio C++ project exercise3 and submit the cpp file when completed Create a C++ program that converts integers between 1 and 3999 into the corresponding roman numerals. Your solution should print an error message for incorrect input. The following roman numeral conversions should prove useful: 1. I 6. VI 50. L 900. CM2. II 9. IX 90. XC 1000. M4. IV 10. X 100. C 5. V 40. XL 500 D. Modify the following tester code to obtain an integer from the user and check that it is between 1 and 3999. Then print out the corresponding roman numerals. While the sample code uses an ifthenelse, you could also use a switch statement. /****************************************************** * Roman Numeral Converter August 13 * converts base 10 positive integer >=0 <4000 to roman numerals * @author <your name here> */ #include <iostream> using…arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education





