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: Returning a value

Challenge: Returning a value - C Tutorial

From the course: C Essential Training

Start my 1-month free trial

Challenge: Returning a value

(upbeat music) - [Instructor] For this challenge, use exercise file 05_06-challenge1. Your job is to examine the code and see where you can create a function. How can you make the code more efficient? And then, write that function. The function you create returns a value, which is used inside the main function. This process is typical for most programmers, where you spy a repetitive chunk of code that probably would fit better inside a function. Find that code, write that function. This challenge should take you about 10 minutes to complete.

Contents