seems like I never need malloc to allocate memory dinamically when it comes to strings example:
int main(void)
{
char *str;
puts("keyword:");
scanf("%30[^\n]\n",str);
printf("%s",str);
}
I never defined str size, yet it works
sorry if this is a stupid question it's 2 am and I'm studying for some c quiz lol