Changed strcpy for strncpy and strcmp for strncmp