Computers
Computer Viruses
Computer Programming
C Programming

How do you pass an array of pointers as an argument to a function and from there to another function even recursively in C language?

User Avatar
Wiki User
2011-09-13 05:49:00

The declaration of an array of 3 int pointers will be:

int *p[3];

The declaration of a function that receive an array of int

pointers will be:

int my_func(int **p);

or

int my_func(int *p[]);

and you can pass it to other function simply by passing p.


Copyright © 2020 Multiply Media, LLC. All Rights Reserved. The material on this site can not be reproduced, distributed, transmitted, cached or otherwise used, except with prior written permission of Multiply.