CSE 240 Final EXAM QUESTIONS AND ANSWERS 100% SOLVED (Newest 2025) What is printed by the following code?int main () { int array[5] = {10,30,50,70,90}; int *p = array; cout << *(p+1) + *(&*p) + 1; return 0; } - Correct Answers ✅41 What is the value in the variable Exam::total that is printed when this program is executed?#include
public:
static int total; Exam() { total++; } }; int Exam::total = 0; int main(){ Exam a, b, c; 1 / 4
CSE 240 Final EXAM QUESTIONS AND ANSWERS 100% SOLVED (Newest 2025) Exam *d, *e, *f = new Exam; cout << Exam::total; } - Correct Answers ✅4 a delete instruction is needed before the main() ends.Which of the following options is correct?#include
public:
MyClass() {cout << "MyClass constructed\n";} ~MyClass() {cout << "MyClass destroyed\n";} }; int main(){ MyClass * pt = new MyClass[3]; return 0; } - Correct Answers ✅delete [ ] pt; The semantic structure of imperative programming languages normally include which of the following validations 2 / 4
CSE 240 Final EXAM QUESTIONS AND ANSWERS 100% SOLVED (Newest 2025) parameters type in a function declaration should match these in the function call.division by zero statement should end with a ';' unicity a variable name should start with a letter, '$' or '_' type matching - Correct Answers ✅parameters type in a function declaration should match these in the function call.unicity type matching The syntactical structure of the imperative programming language reviewed in this course include which of the following validations unicity 3 / 4
CSE 240 Final EXAM QUESTIONS AND ANSWERS 100% SOLVED (Newest 2025) statement should end with a ';' type matching a variable name should start with a letter, '$' or '_' division by zero parameters type in a function declaration should match these in the function call. - Correct Answers ✅statement should end with a ';' Running the following program, How many times the message "constructing" is printed on the screen?#include
public:
Rectangle(){ cout <<"constructing"<