Answers for "how to get string without space in c"

C
0

read string with space c

char name[30];
char temp;

printf("Enter age: ");
scanf("%d", &age);
printf("Enter name: ");
scanf("%c", &temp); // temp statement to clear buffer
scanf("%[^n]", name); // read until newline
Posted by: Guest on January-17-2021

Code answers related to "how to get string without space in c"

Code answers related to "C"

Browse Popular Code Answers by Language