Arrays out-of-bounds in functions only?
Is it bad practice (and programming) to use plain arrays in functions not unlike this?
I've done that before and have gotten really severe out of bounds (when the 2nd or 3rd call of the array came around), like -107839 or something for int arrays, -84 for char arrays, etc. I solved the problem like this:
char function(char *string)
char a; /* Is this bad? */
/* etc... */
But why doesn't my declaration of my char array 'a' work?
/* Instead of this: */
/* I used: */
char *a = calloc(4, sizeof(char));