Question
I need the answer to teh following questions for my c++ course: 1. Provide the required line of code that is missing from this function.
I need the answer to teh following questions for my c++ course:
1.
Provide the required line of code that is missing from this function.
int divide (int a, int b=2) { int r; r=a/b; //missing statement goes here }
2. You have the following struct defined in the private area of your class called myClass:
struct database { int id_number; int age; float salary; };
Your class has a member function called setID that is implemented below. Provide the missing line of code to set the struct's id_number variable equal to the value passed to this function when it is called.
void myclass::setID(int id) { database employee; _______________________ }
Note: Do not put spaces in your answer.
3. The binary search is fast and reliable whether the dataset is sorted or unsorted.
True |
False
|
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