#include<stdio.h>
int main()
{
char firstname[40];
char lastname[40];
printf("what's your name? \n");
scanf(" %s %s ", firstname, lastname);
printf("hello there %s %s \n", firstname, lastname);
return 0;
}
the program freezes after scanning firstname and lastname