Question: C ++ program to pass a 1 - d array ( as a pointer ) and a number to a method - which searches the
C ++ program to pass a 1 - d array ( as a pointer ) and a number to a method - which searches the number in the array and if found - prints sum of all numbers before that number , else prints Invalid Number Accept the array elements and the number to be searched - from the user . Eg . Syntax of the method voidcalcSum int * ptr int num )
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
