Skip to content
KnowledgeCity

C Programming Functions

Understand how to write value-returning and void functions in C programs
Preview the first lesson free — get full access to all 5 lessons.
Course: On-Demand
Beginner Provider Mike McMillan  5 Lessons ·  30m  in Arabic, German, English, Spanish, French, Portuguese, Chinese 

Course Description

One of the most important programming techniques is the ability to effectively use functions. In this course on Functions, you’ll learn how to modularize your code so that each important task can be defined separately and then the different functions can be used together to form a complete program.

In these lessons, you’ll learn how a value-returning function takes data and transforms it in some way, such as converting a temperature from Celsius to Fahrenheit. You’ll also learn how void functions are used to execute a function without returning a value, like when you want to display a greeting in several different places in a program. We’ll explain how to create each type of function and where to incorporate them into your programs. We’ll also cover how functions make program code easier to read, and also easier to debug by isolating errors to a specific function within all that code.

What You'll Learn

  • Modularize code by defining each important task as a separate function
  • Create value-returning functions that take data and transform it, such as converting Celsius to Fahrenheit
  • Create void functions that execute without returning a value, such as displaying a greeting in several places
  • Build functions with multiple parameters and apply built-in functions
  • Apply variable scope when working with functions
  • Use functions to make program code easier to read and easier to debug by isolating errors

Key Takeaways

  • Effectively using functions is one of the most important programming techniques, allowing code to be modularized so each task is defined separately and combined into a complete program.
  • A value-returning function takes data and transforms it in some way, such as converting a temperature from Celsius to Fahrenheit.
  • A void function executes without returning a value, such as displaying a greeting in several different places in a program.
  • Functions make program code easier to read and easier to debug by isolating errors to a specific function.
  • The course covers how to create each type of function and where to incorporate them into programs.

Frequently Asked Questions

What will I learn in this C Programming Functions course?

You will learn how to create code using advanced C functions, how to modularize your code so each task can be defined separately, and the difference between value-returning functions and void functions.

What is the difference between value-returning functions and void functions?

A value-returning function takes data and transforms it in some way, such as converting a temperature from Celsius to Fahrenheit, while a void function executes without returning a value, such as displaying a greeting in several different places in a program.

What topics or lessons does this course cover?

The course covers Built-In Functions, Value Returning Functions, Void Functions, Functions with Multiple Parameters, and Functions and Variable Scope.

How can functions help with debugging?

Functions make program code easier to read and also easier to debug by isolating errors to a specific function within the code.