I wrote a simple C program that takes any number of text parameters and echos them out.
int main(int argc, char*argv[]){
for (int i=1;i<argc;i++){
for (int j=0;j<strlen(argv[i]);j++){
printf("%c", argv[i][j]);
}
}
}
Running the code, it seems to be working as intended, such as
$./echo hello world
hello world
But if I add exclamation marks to the input, it goes haywire.
$./echo hello world!!
hello world./echothehelloworld
And the more exclamation marks I add at the end, it repeats to the output exponentially.