Question: Problem 2 Download the Spanish_conjugator.c code. Modify it by doing the following: Get rid of all pointers Create a struct that will contain six strings:

 Problem 2 Download the Spanish_conjugator.c code. Modify it by doing thefollowing: Get rid of all pointers Create a struct that will contain

Problem 2 Download the Spanish_conjugator.c code. Modify it by doing the following: Get rid of all pointers Create a struct that will contain six strings: the verb base (for instance, "habl"), yo, tu, el, nosotros, and ellos forms. Use the struct to print out the verb forms HINT: To join two strings together in C++, you can use the + operator. For instance, if str1 is "a", and str2 is "b", if str3 = str1 + str2, str3 will be "ab." HINT: Use str1.pop_back() to get rid of a character at the end of a string. In Spanish, we will always get rid of the last two letters of a verb. Please enter a normal Spanish verb ending in -ar: hablar You entered: hablar First conjugation: hablo Second conjugation: hablas Third conjugation: habla Fourth conjugation: hablamos Fifth conjugation: hablan#include int conjugation(int index, char *base, char *conj) { int i = 0; while (*(conj + i) != '\\0') { * (base + index + i) = *(conj + i); printf("%p %s\ ", conj + i, base); i = i + 1; } * (base + index + i) = '\\0'; return 0; int main( ) { char spanish_word [50 ] ; char *spanishptr = &spanish_word[0] ; char yo[2] = "o\\0"; char tu[3] = "as\\0"; char el[2] = "a\\0"; char nosotros [5] = "amos\\0"; char ellos [3] = "an\\0"; char *yoptr = &yo[0 ]; char *tuptr = &tu[0]; char *elptr = &el[0]; char *nosotrosptr = &nosotros[0]; char *ellosptr = &ellos[0]; printf( "Please enter a normal Spanish verb ending in -ar: "); scanf("%s", spanish_word) ; printf("You entered: %s \ ", spanish_word); int index = 0; for (int i = 0; i

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!