Friday, July 29, 2016

C Basics - Functions in C

A function is a block of statements that together perform a task of some kind. Every C program has at least one function, which is main().

built-in functions: The C standard library provides numerous built-in functions that your program can call. For example, printf() and scanf().

User defined function: You can divide up your code into separate functions such that each function performs a specific task.

A function declaration tells the compiler about a function's name, return type, and parameters. A function definition provides the actual body of the function. A function can also be referred as a method or a sub-routine or a procedure, etc.

Function Definition and Declaration
Calling a Function
Variable Arguments
Command Line Arguments

Related topics:
Function Definition and Declaration in C   |   Calling a Function in C   |   Recursion in C   |   Variable Arguments in C   |   Command Line Arguments in C

List of topics: C Programming

No comments:

Post a Comment