Skip to content

Instantly share code, notes, and snippets.

@mkmkme
Created May 26, 2015 08:55
Show Gist options
  • Save mkmkme/e05546218f37bc20b7fd to your computer and use it in GitHub Desktop.
Save mkmkme/e05546218f37bc20b7fd to your computer and use it in GitHub Desktop.
Nobody cares about your array size
#include <stdio.h>
#include <string.h>
int f(char arr[6])
{
return printf("%s\n", arr);
}
int main(int argc, char const *argv[])
{
char a[6];
char b[8];
strcpy(a, "lolol");
strcpy(b, "abcdefg");
f(a);
f(b);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment