Skip to content

Instantly share code, notes, and snippets.

@claudijd
Created July 13, 2013 04:16
Show Gist options
  • Save claudijd/5989392 to your computer and use it in GitHub Desktop.
Save claudijd/5989392 to your computer and use it in GitHub Desktop.
Another buf example
#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;
}
@zsmynl
Copy link

zsmynl commented Jul 13, 2013

good,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment