Question: c++ QUESTION 11 1. Which are true for a constructor? (Select all that apply) a)It has no return value b)It is declared outside of the
c++
QUESTION 11
1. Which are true for a constructor? (Select all that apply)
a)It has no return value
b)It is declared outside of the class.
c)The name of a constructor has the same name as its class.
d)It is public.
e)It is private.
f)It has no variables.
QUESTION 12
1. What does this code display?
cout<<(123%7?"Yes":"No");
a) Yes
b)No
QUESTION 13
1. The following O() functions represent the speed / performance / complexity of an algorithm. Order the following performance functions from fastest to slowest, where fastest is the fewest number of programming steps, and slowest is the most programming steps.
a)O(n^n)
b)O(n*n)
c)O(k)
d)O(log n)
e)O(n)
f)O(n log n)
QUESTION 14
1. What is the order O( ) of binary search?
a)O(n log n)
b)O(n ^ 2) Clarification: The meaning of n ^ 2 is n-squared, or n * n
c)O(1)
d)O(n)
e)O(log n)
QUESTION 15
1. What is the order O( ) of linear search?
a)O(log n)
b)O(n ^ 2) Clarification: The meaning of n ^ 2 is n-squared, or n * n
c)O(n)
d)O(1)
e)O(n log n)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
