---
name: "memarrfill"
section: "3pub"
platform: "linux"
package: "publib-dev"
version: "0.40-4"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/memarrfill"
---

# memarrfill(3pub)

fill an array with the value of its first element

## NAME

memarrfill - fill an array with the value of its first element

## SYNOPSIS

```
#include <publib.h>
void *memarrfill(void *arr, size_t elsize, size_t nelem);
```

## DESCRIPTION

*memarrfill* sets all elements the array *arr* to the value of its first element. The array has *nelem* elements (including the first one), each of which is *elsize* bytes big.

## RETURN VALUE

*memarrfill* returns its first argument.

## SEE ALSO

publib(3), memfill(3)

## AUTHOR

Lars Wirzenius (lars.wirzenius@helsinki.fi)
