This part is confusing me a bit. When i run the program an use "one two three" as input the first print of the buffer is a-ok. Once i use strtok and try to print the buffer again it only prints "one" and not "one two three". Have i changed the content of the buffer without knowing? If yes is there a way for that not to happen? Thank you for your time!
#include "stdlib.h"
#include "string.h"
int main (void )
{
char *buffer;
size_t buffer_size =64;
buffer = (char *) malloc(64 * sizeof (char ));
getline(&buffer,&buffer_size,stdin);
char *anotherbuffer;
printf("%s\n",buffer);
anotherbuffer = (char *) malloc(64 *sizeof (char ));
anotherbuffer = strtok(buffer," ");
anotherbuffer = strtok(NULL," ");
printf("The buffer \"buffer\" containts %s\n",buffer);
printf("The buffer \"anotherbuffer\" containts %s\n",anotherbuffer);
return 0;
}```