Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.27 KB | None | 0 0
  1. #include <stdlib.h>
  2. #include <string.h>
  3. #include <stdio.h>
  4.  
  5. void func(char arg[])
  6. {
  7.   char buffer[20];
  8.   strcpy(buffer,arg);
  9. }
  10.  
  11. int main(int argc, char *argv[])
  12. {
  13.   if(argc < 2)
  14.         printf("What's your name ?  <name>\n");
  15.   else {
  16.         func(argv[1]);
  17.         return 0;
  18.   }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement