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: Passing values - C Tutorial
From the course: C Essential Training
Challenge: Passing values
(upbeat music) - [Instructor] Your challenge begins with the exercise file 05_09-challenge1. It's missing the line function, therefore, your task is to write this function. The function is called in the main function and it has two arguments, an integer and a character. You must write code in the function to generate a line of characters. The number and type of characters are specified in the function, so the function call includes the arguments 35 and a hyphen, the function outputs 35 hyphen characters. This challenge to take you about 10 minutes to complete.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
Understanding functions3m 21s
-
Creating a function3m 28s
-
Challenge: Writing a function46s
-
Solution: Writing a function1m 10s
-
Returning a value from a function2m 33s
-
Challenge: Returning a value42s
-
Solution: Returning a value1m 40s
-
Passing arguments to a function1m 52s
-
Challenge: Passing values44s
-
Solution: Passing values1m 22s
-
Using the main() function's arguments3m 30s
-
Retaining values in a function2m 58s
-
Creating recursive functions3m 53s
-
Challenge: Complete the code1m 14s
-
Solution: Complete the code1m 31s
-
-