Set buffer with specific value using memset in C - Example of memset()
In this C program, we will learn how to set a particular value to the buffer (character array)? To set the value to the buffer, we will use memset() function.
This C program will demonstrate use of memset(), in this code snippet we will learn how to set specific value using memset() to the buffer.
memset() is a library function of string.h header file which assigns given value to the given number of bytes (characters).
Set buffer (character array) with specific value in C