I would like to input a whole name (including spaces), Here's what I have so far:

#include <stdio.h>

char name[50];

int main(void)
{
scanf("%s",name);
printf("%s",name);
return 0;
}

If I were to enter John Doe, only John would come out of the print statement. How do I "Doe"?