Last active
November 3, 2022 13:35
-
-
Save Silva97/639a5213ce89f92ca05066414bb6d555 to your computer and use it in GitHub Desktop.
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
/******************** | |
* Exemplo desenvolvido por Luiz Felipe | |
* Link do vídeo: https://youtu.be/wUrk9AK6ItY | |
********************/ | |
#include <stdio.h> | |
char keyboard[BUFSIZ]; | |
void getinput(char *buff, int size); | |
int main(){ | |
char text1[6], text2[11]; | |
setbuf(stdin, keyboard); | |
scanf("%5[^\n]s", text1); | |
getinput(text2, 10); | |
printf("text1 = %s\n", text1); | |
printf("text2 = %s\n", text2); | |
return 0; | |
} | |
void getinput(char *buff, int size){ | |
setbuf(stdin, keyboard); | |
fgets(buff, size, stdin); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment