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: Passing values - C Tutorial
From the course: Complete Guide to C Programming Foundations
Challenge: Passing values
(upbeat music) - [Instructor] Your challenge begins with this exercise file. It's missing the line function, which draws a line of a specific character a given number of times. Your task is to code the line function. It has two arguments, an integer and a character, which is apparent from viewing the challenge source code. You must write the function to generate a line of characters. The number and type of characters are specified in the function. For example, if the function call includes arguments 35 and a hyphen, the function outputs 35 hyphens. This challenge should take you about 10 minutes to complete.
Contents
-
-
-
-
-
-
-
Understanding functions3m 11s
-
(Locked)
Creating a function4m 52s
-
(Locked)
Challenge: Writing a function39s
-
(Locked)
Solution: Writing a function1m 49s
-
(Locked)
Returning a value from a function2m 23s
-
(Locked)
Challenge: Returning a value53s
-
(Locked)
Solution: Returning a value2m
-
(Locked)
Passing arguments to a function2m 22s
-
(Locked)
Challenge: Passing values41s
-
(Locked)
Solution: Passing values1m 50s
-
(Locked)
Using the main() function's arguments2m 13s
-
(Locked)
Retaining values in a function2m 34s
-
(Locked)
Creating recursive functions3m 44s
-
(Locked)
Chapter challenge: Write the functions1m 14s
-
(Locked)
Chapter solution: Write the functions2m 15s
-
-
-
-
-
-
-