Skip to content

Instantly share code, notes, and snippets.

@ngharo
Created August 9, 2012 02:19
Show Gist options
  • Save ngharo/3300355 to your computer and use it in GitHub Desktop.
Save ngharo/3300355 to your computer and use it in GitHub Desktop.
#include <stdlib.h>
#include <stdio.h>
int add(int x, int y) {
int z = 10;
z = x + y;
return z;
}
main (int argc, char **argv) {
int a = atoi(argv[1]);
int b = atoi(argv[2]);
int c;
char buffer[100];
gets(buffer);
puts(buffer);
c = add(a,b);
printf("Sum of %d+%d = %d\n", a, b, c);
exit(0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment