Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ASSIGNMENT 4 Do not forget to read the warnings at the end of the document before coding and submission. In this assignment you are going

image text in transcribed
image text in transcribed
ASSIGNMENT 4 Do not forget to read the warnings at the end of the document before coding and submission. In this assignment you are going to write a program that takes a string, and two capital letters as an input. Your program will check the elements of the string, and if they are letters that are in between given capital letters, it will move them to the end of the string. For example, If the input capital letters are A and D, the program is going to move the characters "a Ab BCC d D" to the end of the string. Input string: "This is a ABC test" Ouput string: "This is testaABC" You are not going to use any libraries other than Function 1: (30 pts) Name of the function: isInBetween Return type of the function: int 1. Parameter: character 1 2. Parameter: character 2 3. Parameter: a character to check You are going to use this function to check if a character is in between given letters or not. Assume the input characters are always capital letters. Function 2: (50 pts) O Name of the function: move To End Return type of the function: void 1. Parameter: a char pointer to the string 2. Parameter: an integer to represent left element 3. Parameter: an integer to represent right element 4. Parameter: First char (chi) 5. Parameter: Second char (ch2) In this function you will check the elements of the string and move the letters that are in between chi and ch2 to the end of the string You are going to use the first function to check if the elements of the string are in between or not. You are expected to use pointer notation to change the input string. You are not allowed to use a second string (if you use a second string, your homework will be evaluated out of 60 points) Do not use any loop structures. Main function: (20 pts) Enter a string for testing your code Call the moveToEnd function to print the final output. WARNING: Submit only the source file in the format assignment4_name_surname.c Be sure the extension of your file is.c. If you do not know how to check the extension please look at the file ("How to run your code?) on the COADSYS. Do not use any library other than stdio. That means, you are not allowed to use string library functions (such as strlen, strcmp) in this assignment

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data, Mining, And Analytics Components Of Strategic Decision Making

Authors: Stephan Kudyba

1st Edition

1466568704, 9781466568709

More Books

Students also viewed these Databases questions