Here is a code to print elements of an array. I am getting an error.Can anyone find out what is the problem with the code?
#include <iostream>
using namespace std;
int print_r(char arrName,int len){
for(int i=0;i<len;i++){
cout<<arrName[i]<<"\t";
}
}
int main(){
int a[3];
a[0]=1;
a[1]=2;
a[2]=3;
print_r(a,3);
return 0;
}