Defining functions (= methods) in C
Calling a functin in C
(uses the same syntax as Java)
- Syntax to
call (= invoke) a
function:
// Invoking a void type function:
functionName ( arguments )
// Invoking a non-void type function:
var = functionName ( arguments )
|
- Example:
float a = 4.0, b;
b = square( a ); // Same syntax as in Java !
|
|
Remember:
C is not object oriented
- C is not
an object oriented programming language
Meaning:
- C's
functions are
similar to
static
methods
in Java:
|
❮
❯