Launch offer
Business website $150 USD Custom plugin $200 USD Ready in 5 days
Get a quote
C Programming

Double Pointers in C

Use pointer-to-pointer for resizing pointers or 2D structures.

Double Pointers in C — a practical guide to C double pointers with clear examples you can reuse in real projects.

C Programming Tutorial Series (55/102). Prefer one article? Read the complete C programming tutorial.

Short description

Common in functions that must change a caller’s pointer value.

Double pointer idea

void alloc_int(int **pp) {
    *pp = malloc(sizeof(int));
    if (*pp) **pp = 7;
}

Leave a reply

Your email address will not be published. Required fields are marked *