Skip to content

Instantly share code, notes, and snippets.

@MosheBerman
Created April 16, 2013 03:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MosheBerman/5393190 to your computer and use it in GitHub Desktop.
Save MosheBerman/5393190 to your computer and use it in GitHub Desktop.
An example where we call a function called sum() from main();
// Prototypes:
int sum(int, int);
/* Main program */
int main()
{
int z = sum(1, 1); // z will become 2 here
return 0;
}
/* Program definition */
int sum(int x, int y)
{
return x+y;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment