I am working on one-dimensional arrays for class assignment. I don't think I have this right. Can someone check this:
The question is: Write the c++ code that will count the number of elements in an array (named number) of base type int. that are equal to a key value named key_value. The number of components is saved in the variable: size.
here is what I got:
int number[] = key_value;
int size = sizeof (number)/sizeof (number[0];
how far off am I?