EmbLogic's Blog

Structure of a Function

Structure of a Function

A general form of a C function looks like this:

FunctionName (Argument1, Argument2, Argument3……)
{
Statement1;
Statement2;
Statement3;
}

An example of function.

int sum (int x, int y)
{
int result;
result = x + y;
return (result);
}

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>