Question
I would like to solve the following problem in C without the use of pointers: You are given a 2D char array that contains 4
I would like to solve the following problem in C without the use of pointers:
You are given a 2D char array that contains 4 names: strings[4][8] = {{"John Doe"}, {"Jane Doe"}, {"Josh Doe"}, {"Judy Doe"}}; Copy each string into the following char array: char temp[8]; After copying the string, use a line delimiter and switch the locations of the first and last name. For example, "John Doe" should become "Doe John". Then, overwrite the original value in strings with this new value. If done correctly, the printStrings function should now print: Doe John Doe Jane Doe Josh Doe Judy
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started