Created
February 25, 2016 07:51
-
-
Save mskorzhinskiy/120dd8912d9743869faa to your computer and use it in GitHub Desktop.
Reading from input
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define STRING_MAX_LENGTH 256 | |
void read_some_input_snipper { | |
char *result; | |
char *name; | |
char buf[STRING_MAX_LENGTH]; | |
fgets(buf, sizeof(buf), stdin); | |
ssprintf(buf, "%s%[^\n]", name, result); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment