Thursday 14 May 2015

How to find length of an array in C or C++?


To find the length of an array in C or C++, you can use the following:

int n=sizeof(a)/sizeof(a[0]);

Here, a is array

No comments:

Post a Comment