Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 40121

Size of Array

$
0
0

I encountered a problem while coding for a program. When we pass an array through reference to a function then how can we know about the size of the array that is passed . Remember that we are not passing the size of array.

int main() {

int a[]={1,2,3,4,5,5,3,2};

func(a);

return 0;}


int func(int a[])

{ //how to know the size of the a if size is not passed to the function

return 0; }


Viewing all articles
Browse latest Browse all 40121

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>