COP 3330 FSU Exam 1
COP 3330 FSU Exam 1 A class destructor a) may have any number of parameters b) must be paired with each constructor for the class c) will be created automatically if none is supplied by the programmer d) is responsible for de-allocating resources when an object goes out of scope e) is called by operator new f) is called by operator delete g) must be supplied with the class if a constructor is also supplied h) is called multiple times by an operator delete [] - will be created automatically if none is supplied by the programmer is responsible for de-allocating resources when an object goes out of scope is called by operator delete is called multiple times by an operator delete [] Consider the following function prototype: void Funky (const int * a, size_t size); and suppose your have a client program with an array declared as follows: int intArray[20]; a) The call Funky(intArray,10); is not allowed to change the value of intArray. b) The call Funky(intArray,10); will likely result in a compile error. c) The call Funky(intArray,20) is allowed to change the value intArray[20]. d) The call Funky(intArray,10) is not allowed to change the value of intArray[5]. - The call Funky(intArray,10) is not allowed to change the value of intArray[5] Consider the following program: int F(int a, int& b) { a = a - 1; b = b - 1; return a + b; } int main()
Written for
- Institution
- COP 3330 FSU
- Course
- COP 3330 FSU
Document information
- Uploaded on
- April 13, 2024
- Number of pages
- 19
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
-
cop 3330 fsu exam 1