Skip to content

Instantly share code, notes, and snippets.

@RdlP
Created October 21, 2016 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RdlP/baed11e5e3cb859dd10080a3bbaddf8f to your computer and use it in GitHub Desktop.
Save RdlP/baed11e5e3cb859dd10080a3bbaddf8f to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
void func(char *arg)
{
char name[32];
strcpy(name, arg);
printf("Bienvenido %s\n", name);
}
int main (int argc, char *argv[])
{
if (argc != 2)
{
printf("Uso: %s Tu_NOMBRE\n", argv[0]);
system("echo Uso: ./name Tu_NOMBRE");
exit(0);
}
func(argv[1]);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment