Kaustubh N

Kaustubh N

  • NA
  • 1
  • 8.5k

Passing array to a function [pass by reference]

Oct 17 2010 6:52 PM
I have declared an array y[21] in main and want to pass it to a function using pass by reference
Plz tell me whats wrong in following statements..

int y[21];    //array declaration
void printfunction(int *y);    //protoype
printfunction(y);  //call

what changes are required?


Answers (2)