Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Assume we have dynamically allocated an array arr of 50 doubles. Which statement will deallocate these memory locations? delete double arr(50); delete arr[]; delete []
Assume we have dynamically allocated an array arr of 50 doubles. Which statement will deallocate these memory locations? delete double arr(50); delete arr[]; delete [] arr; delete double[] arr; What will be the output of the following C++ code? int main () \{ unsigned int i; vector first; vector second (4,100); vector third (second.begin(), second.end()); vector fourth (third); int myints[] ={16,2,77,29} vector fifth (myints, myints + sizeof(myints) / sizeof(int) ); for (vector : iterator it = fifth.begin(); it != fifth.end(); ++it) cout " ' it; return 0 \} 16 162 1627729 16277 1. Given the following code class A\{ protected: int a, b; public: float f1, f2; \} class B: class A{} Which variables in class A that class B could access? \begin{tabular}{l} \hlinea,b,f1,f2 \\ \hlinef1,f2 \\ \hlinea,b \end{tabular} none of the above Two objects belonging to different classes in the same program can have same names. 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