lundi 29 juin 2015

calculate the number of elements in the array passed to a function [duplicate]


This question already has an answer here:

How can I calculate the number of elements in the array if I don't want to pass the number of elements as another argument say,

fun(a, sizeof(a)/sizeof(*a));

and receive as

int fun(int a[], int limit)
{
}


Aucun commentaire:

Enregistrer un commentaire