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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!