Question
c++ Main 1. Create a header file named w0101.h that defines O a bool function named AtLeast () whose header is bool AtLeast(Array& data, const
c++
Main 1. Create a header file named w0101.h that defines O a bool function named AtLeast () whose header is bool AtLeast(Array& data, const T& target, int n) If the values of at least n elements of data are equal to target, it returns true; otherwise, it returns false. If n is nonpositive, the function returns true. an int function named LastInstance () whose header is int LastInstance (Array& data,const T& target) It returns the index of the last element of data whose value is equal to target. If target is not found in data, it returns -1. O an int function named Secondary () whose header is int Secondary (Array& data) It returns the second minimum value in data if data contains at least 2 elements; otherwise, it returns 0. O a bool function named Parity() whose header is bool Parity (Array& data) It returns the Boolean value that appears the most in data. Test 2. Create a cpp file named main.cpp that O calls each function from w0101.h and display their outcomes; but, you must display the Array object argument for the call before each call.
Q63
Write a program that calls fork() and then calls some form of exec() to run the program /bin/ls. See if you can try all of the variants of exec(), including (on Linux) execl(), execle(), execlp(), execv(), execvp(), and execvpe(). Why do you think there are so many variants of the same basic call? Write the code in C/C++ in detail?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started