---
name: "mtree_child"
section: "3"
platform: "linux"
package: "liblibrecast-dev"
version: "0.9.1-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/mtree_child"
---

# mtree\_child(3)

return node number of first child node

## NAME

mtree\_child - return node number of first child node

## LIBRARY

Librecast library (*liblibrecast*, *-llibrecast*)

## SYNOPSIS

```
#include <librecast/mtree.h>
```

**size\_t mtree\_child(mtree\_t** *\*tree***, size\_t** *node***);**

Compile and link with *-llibrecast*.

## DESCRIPTION

The **mtree\_nnode** function returns the node number of the first child of *node* in *tree*.

Nodes are numbered from 0 = root.

## RETURN VALUE

**mtree\_child**() returns the number of the first child node, or 0 if none.

## ERRORS

None.

## SEE ALSO

[**mtree\_init**(3)](/mtree_init/3.md), [**mtree\_free**(3)](/mtree_free/3.md), [**mtree\_build**(3)](/mtree_build/3.md)
