how to get a string in c with space
#include <stdio.h>
int main(){
char name[20];
printf("Enter a name : ");
scanf("%[^\n]%*c", &name);
printf("the name entered is: %s\n", name);
return 0;
}#include <stdio.h>
int main(){
char name[20];
printf("Enter a name : ");
fgets(name, 20, stdin); // fgets(variable_storing_to, accepted_input_size, stdin)
printf("the name entered is: %s\n", name);
return 0;
Also in C:
- RuntimeError: You must setup() the GPIO channel first
- sdl texture error
- check if string in string c
- what is the meaningof noremap
- #include<stdlib.h>
- select all file from date powershell
- meaning of &variable c
- how to create random integers from a specific range in c language
- FILE*
- get the latest field in mongodb collection
- diamond dataset in r
- modulation
- android is not recognized
- houdini vex loop over points
- intellij idea
- how to get a string in c with space
- c bool
- how to break a loop in c
- Ionic 3 camera plugin not returning video from photo library on ios
- 32bit or 64bit
- string compare in c
- esp32 dhcp server
- keras conv2d batchnorm
- Declare macro