Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Declare a multi-dimension array MyArray. This array should be designed to hold a

ID: 3624167 • Letter: D

Question

Declare a multi-dimension array MyArray. This array should be designed to hold at least ten Cstirng of up to 20 characters each. Prompt the user to enter a word of no more than 15 characters. Read in the user's word and store it in the second row of MyArray. Add the character '1' to the end of the user's word and store it in the same location as the original word. Print your modified word to the screen with an appropriate message to the user. ** Extra Credit: Include appropriate error checking. (Up to +5

Explanation / Answer

#include<stdio.h>
#include<string.h>
int main()
{
char MyArray[10][20]; // it will store words of length 20 each
printf("Plz Enter a Word of length 15 :");
scanf("%s",MyArray[1]);   // storing word in second row
strcat(MyArray[1],"1");   //   adding one at end of word
printf("Modified Word is %s",MyArray[1]); // printing modified string.

return 0;
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote