Computer Science, asked by p1998p, 1 year ago

Explain user defined function ?



(dont copy from google)

Answers

Answered by p1998
1
If you have a special set of instructions that aren’t in a built-in function, you can create a user-defined function. Here are the steps:

give your function a name that isn’t already used in C (by built-in functions, types of variables, keywords, etc.)
create a function header, which contains three things:
a. the type of variable (int, char, double, etc.) that the function will produce (return)

b. the name of the function, which can be one or more words (but put underscores _ or CapitalLetters connecting these words, because no spaces are allowed)

c. the parameters of the function, which are the names and types of variables inside your function
Similar questions