The parentheses and curly brackets (???braces???) are mandatory,
but white space between these elements does not matter. The curly brackets are used to
denote the beginning and end of a block of code. Although procedure and function calls
are optional, the program would do nothing without them. Procedure statements are simply
a series of commands that perform operations on data or variables and normally
end with a semicolon.
Functions
Functions are self-contained bundles of algorithms that can be called for execution by
main() or other functions. Technically, the main() structure of each C program is also a
function; however, most programs contain other functions. The format is as follows:
function name (){
}
The first line of a function is called the signature. By looking at it, you can tell if the function
returns a value after executing or requires arguments that will be used in processing
the procedures of the function.
The call to the function looks like this:
function name (arguments
if called for by the function signature);
Again, notice the required semicolon at the end of the function call.
Pages:
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275