Linear search using array reference passing to function
Search for presence of element in an integer array by using a function with a call by reference of array, size and search term.
Source Code
Run Output
Notes
When array is passed as a reference in a target function, its size can not be automatically determined using sizeof operator as only the location of first member of array is passed. Therefore the size of array has to be essentially passed to the target function.
Suggested Filename(s): linearsearchfunc.cpp, searchfunc.cpp, arrrefpassing.cpp
sunmitra| Created: 4-Dec-2017 | Updated: 8-Dec-2017|