HELP plz

How to build this question by using array?

A function named isFound that takes three arguments: an array of integers, its size, and an integer and that returns true if the integer argument is found in the array; otherwise return false.
You can do smth like this:
1
2
3
4
5
6
7
bool isFound(int *array,int size,int argument)//returns bool
{
//...Now you can try to do it yourself with dynamic allocation
.
.
.
}
Last edited on
Hello JessicaMmz,

1
2
3
4
5
6
7
8
bool isFound(int nums[], int size, int numToFind)
{
	bool found{ false };

	// your code

	return found;
}

Basically the same as Zivojin's Answer as int nums[] degrades to a pointer.

Since you need to search an array I do not see any need to dynamically create anything.

Hope that helps,

Andy
Topic archived. No new replies allowed.