From the course: C Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Challenge: Complete the code

Challenge: Complete the code - C Tutorial

From the course: C Essential Training

Start my 1-month free trial

Challenge: Complete the code

(cheerful music) - [Narrator] This chapter's course challenge is the final step in creating the program. Well, honestly, the program's already done, but your challenge here is to optimize the code by creating some functions. Use your solution from chapter four's course challenge or use mine provided in exercise file, 5_14-challenge1, create two functions. The first is to generate the separator row. The second is to output a newline. The good news is that most of this code is written. To create the functions, you merely pull out the code from the main function. Call one of the functions newline its sole job is to output the new line character. The second function is separator row. Its duty is to generate the separator row. This function requires two arguments, a repeat count and the character to repeat and ensure that you call these functions as necessary throughout your code, prototype, and all that stuff you learned…

Contents