Skip to content

Instantly share code, notes, and snippets.

@MosheBerman
Created April 16, 2013 03:50
Show Gist options
  • Save MosheBerman/5393205 to your computer and use it in GitHub Desktop.
Save MosheBerman/5393205 to your computer and use it in GitHub Desktop.
An example where we call a wrapper function from main.
/* Prototypes */
int sum(int, int);
void wrapper();
/* Main program */
int main()
{
wrapper();
return 0;
}
/* Program definition */
void wrapper(){
int xToAdd = 1;
int yToAdd = 1;
int z = sum(xToAdd, yToAdd); // z will become 2 here
}
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