From the course: C Standard Library

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Memory chunk operations

Memory chunk operations - C Tutorial

From the course: C Standard Library

Start my 1-month free trial

Memory chunk operations

- [Instructor] Here we have two very special functions in string.h which manipulate chunks of bytes in memory. The first one is memset, and it writes into the destination buffer in the first argument, the value in its second argument, sequentially as many times as specified in its count argument. Although the second argument has an integer type, it is treated as a unsigned char, meaning a single byte. Now, the second function us memcpy or mem copy, which copies a source buffer's content into a destination buffer. The number of bytes to copy is specified in the third argument.

Contents