Lec33 - Computer Programming I TA C162. What's Next....

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Computer Programming I TA C162 . 10 Apr 2007 What’s Next…. User-Defined Functions Declaration and Definition Function Documentation Function Parameters Examples
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Computer Programming I TA C162 . 10 Apr 2007 What is Function in C? Functions are central to C programming and to the philosophy of C program design. A C program consists of one or more function definitions, including exactly one that must be called main A function is a named, independent section of C code that performs a specific task and optionally returns a value to the calling program. All functions are stand-alone , which means that they are not nested in any other construct
Background image of page 2
3 Computer Programming I TA C162 . 10 Apr 2007 What is Function in C? A function is named : Each function has a unique name. By using that name in another part of the program, one can execute the statements contained in the function. This is known as calling the function. A function can be called from within another function. A function is independent: A function can perform its task without interference from or interfering with other parts of the program.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 Computer Programming I TA C162 . 10 Apr 2007 What is Function in C? A function performs a specific task: Such as sending a line of text to a printer, sorting an array into numerical order or calculating a cube root.
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 19

Lec33 - Computer Programming I TA C162. What's Next....

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online