Ok one last question. In the following
Code:
#include <stdio.h>
#include <string.h>

int main (void)
{
	int i;
	char *str = "xyzabc";
	
	gets(str);
	
	return 0;
}
I still get an error.
Now when the computer sets aside memory for the string "xyzabc", I assume it will only put it in valid memory, memory that isn't already used, and isn't invalid etc.. And str now points to the first location of the 'x'.
So why does this still produce an error after inputting to gets(), even when inputting a string shorter than the initialized one?