I have been asked in an interview how do you pass an array to a function without using any pointers but it seems to be impossible or there is way to do this?
simply pass the location of base element and then accept it as 'int a[]'. Here's an example:-
main() { int a[]={0,1,2,3,4,5,6,7,8,9}; display(a); } display(int a[]) { int i; for(i=0;i<10;i++) printf("%d ",a[i]); }