Created
May 26, 2015 08:55
-
-
Save mkmkme/e05546218f37bc20b7fd to your computer and use it in GitHub Desktop.
Nobody cares about your array size
This file contains hidden or 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> | |
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