how to get a string in c with space
#include <stdio.h>
// program to get a full name
int main(){
char input[100];
printf("Please Enter Your Full Name: ");
scanf("%[^\n]%*c", text);
//%[] is a scanset, which allows scanf to skip scanning certain characters
//Therefore %[^\n] tells scanf not stop scanning until the next line occures
// and %*c tells scanf to use this c as a representative of the new line.
// the "*" tells scanf to delete the temporary newline character.
//read more in the link provided
printf("Your Full Name Is: %s\n", text);
}