Answers for "how to create an empty buffer in c"

C++
0

c clear buffer

void clearBuffer() {
	char c;
	do {
		c = getchar();
	} while (c != '\n' && c != EOF);
}
Posted by: Guest on April-04-2021
1

create a buffer in c

#define MY_BUFFER_SIZE 1024

char mybuffer[MY_BUFFER_SIZE];
int nBytes = read(sck, mybuffer, MY_BUFFER_SIZE);
Posted by: Guest on April-25-2022

Code answers related to "how to create an empty buffer in c"

Browse Popular Code Answers by Language