hi
Write an overload function "searchArray" so that it takes an
array "ary" of int or char, and additional argument,
namely "valu" with type as same as the "ary". A call to this
function will return the index of "valu" within "ary" or -1
if it does not exist.
and this is what i could write for now ..
int searchArray ( int ary[ ],int a){
for ( int i=0;i<=ary.length;i++){
if (ary[i]== a)
return i;
else
return -1;
}
}
it's not complete ..
any one can help me and make it 100% work
thanks