How do i pass an array function without using pointers

前端 未结 7 881
广开言路
广开言路 2021-02-05 21:04

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?

相关标签:
7条回答
  • 2021-02-05 21:48

    If i say directly then it is not possible...!

    but you can do this is by some other indirect way

    1> pack all array in one structure & pass structure by pass by value

    2> pass each element of array by variable argument in function

    0 讨论(0)
提交回复
热议问题