From the course: Complete Guide to C Programming Foundations

Unlock the full course today

Join today to access over 24,500 courses taught by industry experts.

Challenge: Writing a function

Challenge: Writing a function

(pensive music) - [Instructor] It is time for you to write a function. Use the source code provided in this exercise file to get you started. The source code lists calls to a function named line, which isn't defined anywhere in this code. Your job is to write the line function. The function's job is to generate a line of 40 hyphens. The line function is a void type, which you can tell in the exercise file because it accepts no arguments and returns no value. This challenge could take up to 10 minutes to complete, but I bet you do it a lot faster.

Contents