Created
July 13, 2013 04:16
-
-
Save claudijd/5989392 to your computer and use it in GitHub Desktop.
Another buf example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
int main(int argc, const char* argv[]) | |
{ | |
if(argv != 2) | |
{ | |
printf("Usage: %s <text>\n",argv[0]); | |
exit(1); | |
} | |
char buf[50]; | |
strcpy(buf,argv[1]); | |
printf("You wrote:\n%s\n",buf); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
good,