Created
December 6, 2017 11:57
-
-
Save berviantoleo/20583e9229111a31fcd31664cdd96aa2 to your computer and use it in GitHub Desktop.
Standart Input Scanf in C with limit the length of 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
#include <stdio.h> | |
int main() { | |
char str1[5]; | |
scanf("%5s", str1); | |
printf("%s", str1); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment