Skip to content

Instantly share code, notes, and snippets.

@donno2048
Created June 21, 2022 08:49
Show Gist options
  • Save donno2048/e49c24e59407f8dba68244e3f5924aff to your computer and use it in GitHub Desktop.
Save donno2048/e49c24e59407f8dba68244e3f5924aff to your computer and use it in GitHub Desktop.
#include <stdio.h>
void*memset(void*s,int c,int n){}
int main(int argc, char *argv[]) {
while(argc --> 0) argv[argc] = 0;
printf("%s\n", argv);
return 0;
}
/*
`gcc .\main.c -O3 -o main;./main`
and
`gcc .\main.c -o main;./main`
will give different result
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment