C function principle...

Status
Not open for further replies.

dingdong-man

Baseband Member
Messages
66
i'm learning C now. i'm a bit confused with the function on which the programmer puts like following:

void function call (); OR
int function call (); OR sometimes got
void function call (int a, const int *b[]);

when is the condition that we should use each of this function ? how could the pointer is in the prototypes e.g. const int * b[] ?

thnx....
 
the first keyword of any function definition (void, int, char, whatever), tells the function what value type the function will return..

If you write void, you can't return anything (as it's not expecting anything)

and if you put anything in the parameter (after function call, with in the brackets), it can be any type, even pointers/typedef types..

These concepts should be covered in any introductary text, are you sure your learning C and not skipping anything?
 
Status
Not open for further replies.
Back
Top Bottom