Other contributors have said "How to pass an array to a function in c programming?" is the same question as "How do you pass an array to a function in C programming?" If you believe that these are not asking the same thing and should be answered differently, click here

How do you pass an array to a function in C programming?

Answer:
eg:

void foo (char par [])
{
...
}

void bar (void)
{
char var [33];

foo (var); /* or: foo (&var[0]); */
}
First answer by NevemTeve. Last edit by NevemTeve. Contributor trust: 172 Question popularity: 3 [recommend question].