[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 246
  • Last Modified:

C Function

Hi!

How can I pass a pointer to an array through a function?

Tapas
0
tapasmondal
Asked:
tapasmondal
1 Solution
 
manas_ghosalCommented:
it is very simple, let me give u an example:
let the func prototype be:
void func(int *);
in main we pass the pointer to an int array as below:
main(){
   int a[50];
   func(a);
}
0

Featured Post

Turn Raw Data into a Real Career

There’s a growing demand for qualified analysts who can make sense of Big Data. With an MS in Data Analytics, you can become the data mining, management, mapping, and munging expert that today’s leading corporations desperately need.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now