Question: For this assignment, you will write a function that converts a single English word to its pig Latin equivalent. That function should have a header

For this assignment, you will write a function that converts a single English word to its pig Latin equivalent. That function should have a header as follows: char * convertToPigLatin (char * engStr, char * pLatinStr) You'll note that it takes two char * as input and returns a char *, as expected. The two inputs are pointers to the English string and the converted Pig Latin string respectivelv. The return value should be a pointer to the Pig Latin string. That return value can then be assigned to a variable and used to print out the converted string, either to the console or to a file. Your program should then perform the following steps: 1)Open a file for input called pigLatinIn.txt, which will be provided to you. This file will consist of one English word per line. 2)Open a file for output called pigLatinOut.txt. 3) Your program will then read the input file, use the convertToPigLatin () function to determine the pig Latin equivalent to the word, then write the following to the output file: Enqlish word Pig Latin Word cabin apple abin-cay apple-way 4)Print out the results in all lower case
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
