---
name: "array_get"
section: "3"
platform: "linux"
package: "libowfat-dev"
version: "0.32-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/array_get"
---

# array\_get(3)

get pointer to nth element in array

## NAME

array\_get - get pointer to nth element in array

## SYNTAX

**#include \<libowfat/array.h\>**

void\* **array\_get**(array\* *x*, uint64 *membersize*, int64 *pos*);

  array *x*;\
   int64 *pos*;\
   *t*\* p = array\_get(&*x*,sizeof(*t*),*pos*);

## DESCRIPTION

array\_get is similar to array\_allocate, but it does not allocate any extra bytes, and it does not initialize any extra bytes.  It returns 0 if *x* is unallocated, for example, or if fewer than (*pos*+1)\*sizeof(*t*) bytes are initialized.

## SEE ALSO

[array\_allocate(3)](/array_allocate/3.md), [array\_fail(3)](/array_fail/3.md), [array\_start(3)](/array_start/3.md)
