Created
September 9, 2022 10:00
-
-
Save foxbit19/2cd2d55c8715774fbc09982d09d6e825 to your computer and use it in GitHub Desktop.
Simple C program to say welcome to the article reader
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> | |
/** | |
* Says hello to the new reader | |
*/ | |
void welcomeReader(char *inputName) { | |
char name[100]; | |
strcpy(name, inputName); | |
printf("Welcome %s to the buffer overflow article! Happy reading!\n", name); | |
} | |
/** | |
* The main function, it takes the name of the reader as argument | |
*/ | |
int main(int argc, char *argv[]) { | |
welcomeReader(argv[1]); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment