Mega Code Archive
Categories
/
C
/
Code Snippets
Read only a range of char
#include
int main(void) { int j; char str[100], str2[100]; scanf("%d%[abcdefg]%s", &j, str, str2); printf("%d %s %s", j, str, str2); return 0; }