Question: write a function named countNum2s that takes as input an array of integers and an integer that specifies how many entries are in the array.
write a function named countNum2s that takes as input an array of integers and an integer that specifies how many entries are in the array. the function should return the number of 2's in the array. test your function with arrays of different length and with varying number of 2. the answer should be in c++
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
