Skip to content

Instantly share code, notes, and snippets.

@ShivamShrirao
Last active April 9, 2020 23:11
Show Gist options
  • Save ShivamShrirao/7c5e2a5183a232800e73490056177b6b to your computer and use it in GitHub Desktop.
Save ShivamShrirao/7c5e2a5183a232800e73490056177b6b to your computer and use it in GitHub Desktop.
#include <stdio.h>
void getMessage()
{
char msg[200];
printf("Enter message: ");
scanf("%s",msg);
// do something.
printf("The message has been received.");
}
int main()
{
setvbuf(stdin,0,2,0); // to set input and output buffer zero, to serve on network.
setvbuf(stdout,0,2,0);
getMessage();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment