I have this:
in another file I have:Code:#include "func.h" int main() { char array[5] = "hello"; func(array); }
but when i run it it prints hello along with other characters. why. what can i do?Code:#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <sys/types.h> #include <dirent.h> #include "pgmfile.h" #include "malloc_image.h" void func(char array[]) { printf("%s\n", array); }