Skip to content

Instantly share code, notes, and snippets.

@jacobcxdev
Created April 1, 2022 01:10
Show Gist options
  • Save jacobcxdev/0d3ee61c397904740962b56ee609e522 to your computer and use it in GitHub Desktop.
Save jacobcxdev/0d3ee61c397904740962b56ee609e522 to your computer and use it in GitHub Desktop.
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
void greeting(char *arg) {
char name[68];
strcpy(name, arg);
printf("welcome our agent %s, and Goodbye!\n", name);
}
int main(int argc, char *argv[]) {
if (argc != 2) {
fprintf(stderr, "Syntax: %s <yourname>\n", argv[0]);
exit(1);
}
printf("process %s \n",argv[0]);
greeting(argv[1]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment