Skip to content

Instantly share code, notes, and snippets.

@wjlafrance
Created December 24, 2011 07:58
Show Gist options
  • Save wjlafrance/1516749 to your computer and use it in GitHub Desktop.
Save wjlafrance/1516749 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <string.h>
int main(int argc, char **argv)
{
printf("i have %i args\n",argc);
int i;
for (i = 0; i < argc; i++) {
if (i != argc - 1)
memset(argv[i] + strlen(argv[i]), ' ', 1);
}
printf("i joined a string!: %s\n", argv[0]);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment