ANSI C Programming: Functions


Overview/Description
Target Audience
Prerequisites
Expected Duration
Lesson Objectives
Course Number



Overview/Description
To introduce functions in ANSI C and describe how to write and use them in programs

Target Audience
Programmers and software developers new to ANSI C

Prerequisites
Awareness of programming concepts; experience of using a third-generation, high-level language, such as Pascal, PL/1, BASIC, or FORTRAN

Expected Duration (hours)
5.3

Lesson Objectives

ANSI C Programming: Functions

  • distinguish between library and user-defined functions and identify the basic elements of a function in ANSI C.
  • declare and define functions in ANSI C.
  • use header files in ANSI C.
  • list the advantages of using functions and use the correct syntax for functions in ANSI C.
  • write a function that converts temperature readings from Fahrenheit to Celsius in ANSI C.
  • identify elements of an ANSI C function and format them correctly.
  • distinguish between formal and actual parameters and compare ANSI C function headers with other versions of C.
  • identify the points in a program where functions are declared, defined, and called and in ANSI C.
  • write a program in ANSI C that raises one number to the power of another.
  • list the features of return statements, return expressions, and function prototypes in ANSI C.
  • distinguish between calling by reference and calling by value in ANSI C and to list the characteristics and advantages of each.
  • write a program with functions that pass parameters, using call by value in ANSI C.
  • list the four storage classes in ANSI C and describe their extent.
  • describe the scope of storage classes and functions in ANSI C.
  • distinguish between recursive and nonrecursive functions and list the advantages of recursion in ANSI C.
  • write an ANSI C program that uses recursion to calculate the factorial of a given number.
  • Course Number:
    116670_eng