Answers for "how to pass arrays by reference c++"

C++
0

how to pass arrays by reference c++

#include <iostream>
using namespace std;
void show( int *num) {
   cout<<*num;
}
int main() {
   int a[] = {3,2,1,6,7,4,5,0,10,8};
   for (int i=0; i<10; i++) {
      show (&a[i]);
   }
   return 0;
}
Posted by: Guest on June-27-2021

Code answers related to "how to pass arrays by reference c++"

Browse Popular Code Answers by Language