Using reference instead of copy for the array is better but good efficient and simple example though !
Do not use using namespace std, do not use c-style arrays (prefer std::vector / std::array), and the function linearSearch should not return anything
@hadrienbelleville22