C PROGRAMMING ONLY) 4. Man's Best Friend by CodeChum Admin We all know what man's best friend is. A dog! ? Let's create one in our program using the pre-existing struct Dog provided. Instructions: In the code editor, you are provided with the definition of a struct Dog. This struct needs a string value for its breed. Furthermore, you are provided with a displayDog() function which accepts a struct Dog as its parameter. Your task is to create a Dog, take in a string user input, and then set it as the Dog's breed. Finally, call the displayDog() function and pass that Dog you created. Input 1. The breed of the Dog Output Enter·the·breed·of·the·Dog:·Golden·Retriever Arf·arf!·I'm·a·Golden·Retriever
(C
4. Man's Best Friend
by CodeChum Admin
We all know what man's best friend is. A dog! ?
Let's create one in our program using the pre-existing struct Dog provided.
Instructions:
In the code editor, you are provided with the definition of a struct Dog. This struct needs a string value for its breed. Furthermore, you are provided with a displayDog() function which accepts a struct Dog as its parameter.
Your task is to create a Dog, take in a string user input, and then set it as the Dog's breed.
Finally, call the displayDog() function and pass that Dog you created.
Input
1. The breed of the Dog
Output
Enter·the·breed·of·the·Dog:·Golden·Retriever
Arf·arf!·I'm·a·Golden·Retriever
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images