SHARE
TWEET

Untitled

a guest Apr 19th, 2010 237 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<stdio.h>
  2. #include<stdlib.h>
  3.  
  4. int add(int x, int y)
  5. {
  6.         int z =10;
  7.  
  8.         z = x + y;
  9.         return z;
  10. }
  11.  
  12. main(int argc, char **argv)
  13. {
  14.         int a = atoi(argv[1]);
  15.         int b = atoi(argv[2]);
  16.         int c;
  17.         char buffer[100];
  18.  
  19.         gets(buffer);
  20.         puts(buffer);
  21.  
  22.         c = add(a,b);
  23.         printf("Sum of %d+%d = %d\n",a, b, c);
  24.  
  25.         exit(0);
  26. }
RAW Paste Data
Want to get better at C?
Learn to code C in 2017
Pastebin PRO Summer Special!
Get 40% OFF on Pastebin PRO accounts!
Top