Skip to main content

Functions in C

  • Chapter
Beginning C for Arduino
  • 4247 Accesses

Abstract

You already know what a function is, but let’s give it a formal definition. A function is a body of code designed to solve a particular task. You should think of a function as a black box, the contents of which are unknown to you. All you care about is that it addresses some task to be accomplished in your program. Hundreds of functions are available for you to use in various function libraries. A function library is simply a collection of functions that share a common area of interest (e.g., the Math and Time functions in Arduino C.) Functions make your life easier because you can stand on the shoulders of those who came before you. You can use their code rather than writing, testing, and debugging the code yourself.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

eBook
USD 16.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 16.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2012 Jack Purdum

About this chapter

Cite this chapter

Purdum, J. (2012). Functions in C. In: Beginning C for Arduino. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-4777-7_6

Download citation

Publish with us

Policies and ethics