Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

#include #include // Read before you start: // Do not modify any part of this program that you are given. Doing so may cause you

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

#include  #include  // Read before you start: // Do not modify any part of this program that you are given. Doing so may cause you to fail automated test cases. // You are given a partially complete program. Your job is to complete the functions in order for this program to work successfully. // You should complete this homework assignment using Microsoft Visual Studios 2013 (or a later version). // All instructions are given above the required functions, please read them and follow them carefully. // If you modify the function return types or parameters, you will fail the automated test cases. // You can assume that all inputs are valid. Ex: If prompted for a char, the input will be a char. // Global Macro Values #define NUM_STRINGS 5 #define STRING_LENGTH 32 // Forward Declarations void frequency(char[NUM_STRINGS][STRING_LENGTH],char); void remove_Number(char[NUM_STRINGS][STRING_LENGTH]); void swapStrings(char[STRING_LENGTH], char[STRING_LENGTH]); void sortStrings(char[NUM_STRINGS][STRING_LENGTH]); void printStrings(char[NUM_STRINGS][STRING_LENGTH]); int alpha_Counter(char[STRING_LENGTH]); int isAPalindrome(char[STRING_LENGTH]); void addLetter(char[STRING_LENGTH], char, int); // Problem 1: frequency (5 points) // Rewrite this function to perform the same task as in hw03, using only pointer operations. // You must use pointer operations only. If you use array operations, you will recieve no credit for this part. // You may use the code you submitted for hw03 or you may use the solution code for hw03. // Traverse the 2D array of characters variable 'strings' and check the frequency of a particular letter or a search_alphabetin a string. // In order to check the frequency, first you need to read the search_alphabet from the user. // If the string is "hello" and the search_alphabet is l, the code will count the number of 'l's in hello. // The output of the function for the above mentioned case will be 2. //append that frequency value at the end of the string //for hello the new string will be hello2 void frequency(char strings[NUM_STRINGS][STRING_LENGTH],char search_alphabet) { } // Problem 2: remove_vowel (5 points) // Rewrite this function to perform the same task as in hw03, using only pointer operations. // You must use pointer operations only. If you use array operations, you will recieve no credit for this part. // You may use the code you submitted for hw03 or you may use the solution code for hw03. //Traverse the 2D array of characters variable 'strings' and remove all vowels from the string. // In order to remove all vowel characters, you need to check each letter of the string and decide whether its is a vowel. If so then remove it. If not then check the next character. // If the string is "hello", your result will be hll. //print the new string without vowel using problem 6. void remove_vowel(char strings[NUM_STRINGS][STRING_LENGTH]) { } void swapStrings(char string1[STRING_LENGTH], char string2[STRING_LENGTH]) { char temp[STRING_LENGTH]; strcpy(temp, string1); strcpy(string1, string2); strcpy(string2, temp); } // Problem 3: sortStrings (10 points) // Rewrite this function to perform the same task as in hw03, using only pointer operations. // You must use pointer operations only. If you use array operations, you will recieve no credit for this part. // You can use the swapStrings() function if you'd like, but are not required to do so. // You may use the code you submitted for hw03 or you may use the solution code for hw03. // // Sort the 5 strings contained in the 2D character array parameter labeled "strings". // Sort the strings based on their ASCII character value (use strcmp to compare strings). // See the output provided in the word document for example input and output. void sortStrings(char strings[NUM_STRINGS][STRING_LENGTH]) { } void printStrings(char strings[NUM_STRINGS][STRING_LENGTH]) { int i; for (i = 0; i   You are given a hw04.c file which contains a partially completed program. You are to follow the instructions contained in comments and complete the required functions. You will be rewriting 3 functions from hw03 (frequency, remove vowel, and sortStrings) using only pointer operations instead of using array operations. In addition to this, you will be writing 3 new functions (alpha Counter, iSAPalindrome, and addLetter). You should not be using any array operations in any of functions for this assignment. You can find out more about these functions by reading through the instructions in the hw04.c file. Example outputs are below

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

Concepts of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

7th edition

978-1111825911, 1111825912, 978-1133684374, 1133684378, 978-111182591

More Books

Students also viewed these Databases questions

Question

How to solve maths problems with examples

Answered: 1 week ago