Podcast
Questions and Answers
True or false: This exam is open book and open notes?
True or false: This exam is open book and open notes?
True
True or false: Electronic devices are allowed in this exam?
True or false: Electronic devices are allowed in this exam?
False
True or false: Students are allowed to define additional helper functions or structures for programming questions?
True or false: Students are allowed to define additional helper functions or structures for programming questions?
False
True or false: The total number of questions in this exam is 5?
True or false: The total number of questions in this exam is 5?
Signup and view all the answers
True or false: All programming codes in the answers must be written in ANSI C++ version?
True or false: All programming codes in the answers must be written in ANSI C++ version?
Signup and view all the answers
Explain how you can effectively pass back two numbers in a C++ function.
Explain how you can effectively pass back two numbers in a C++ function.
Signup and view all the answers
Given the array const int SIZE = 5; int arr[SIZE] = {3, 6, 4, 6, 7}; and the void swap(int& a, int& b) function which swaps two variables’ values, what will the above array contain when the following code segment is executed?
Given the array const int SIZE = 5; int arr[SIZE] = {3, 6, 4, 6, 7}; and the void swap(int& a, int& b) function which swaps two variables’ values, what will the above array contain when the following code segment is executed?
Signup and view all the answers
Explain the instruction regarding the use of electronic devices in the exam.
Explain the instruction regarding the use of electronic devices in the exam.
Signup and view all the answers
What are the restrictions for writing programming codes in the answers?
What are the restrictions for writing programming codes in the answers?
Signup and view all the answers
How many questions are there in the exam?
How many questions are there in the exam?
Signup and view all the answers
Study Notes
Exam Format
- Exam format is open book and open notes.
- Electronic devices are not allowed during the exam.
- Students are permitted to define additional helper functions or structures for programming questions.
- The total number of questions in the exam is 5.
Programming Guidelines
- All programming codes in answers must adhere to ANSI C++ standards.
- To effectively pass back two numbers in a C++ function, use reference parameters to allow the function to modify the original values.
Array and Function Example
- Given the array
const int SIZE = 5; int arr[SIZE] = {3, 6, 4, 6, 7};
and thevoid swap(int &a, int &b)
function, the array will reflect the changes after the swap operation is executed, altering the values at specified indices.
Electronic Devices Policy
- Strict instruction prohibits the use of electronic devices during the exam.
Programming Code Restrictions
- Students must comply with ANSI C++ standards for their programming code submissions.
Exam Structure
- The exam consists of a total of 5 questions.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Description
Prepare for the COMP 2011 final exam with this practice test based on the Spring 2018 exam paper from HKUST. The exam covers various topics including programming in ANSI C++. Get ready to test your knowledge in a simulated exam environment.