COSC 1436 Final Exam Questions and Verified Answers, 100% Guarantee Pass (Latest 2025) What are Abstract Data Types - Correct Answers ✅A data type that specifies values that can be stored, and the operations that can be done on the values.User of an abstract data type does not need to know the implementation of the datatype, (its code) Abstraction - Correct Answers ✅a definition that captures general characteristics without details Data Type - Correct Answers ✅defines the values that can be stored in a variable and the operations that can be performed on it Structure - Correct Answers ✅C++ construct that allows multiple variables to be grouped together Defining a structure - Correct Answers ✅*Must have ; after closing } struct structName { dType varName; dType2 varName2;
}; 1 / 3
COSC 1436 Final Exam Questions and Verified Answers, 100% Guarantee Pass (Latest 2025) Accessing Structure Members - Correct Answers ✅use the
dot (.) operator to refer to members of struct variables:
cin >> stu1.studentID; getline(cin, stu1.name); stu1.gpa = 3.75 Comparing struct variables - Correct Answers ✅Cannot
compare struct variables directly:
if (bill == william) // wont work if(bill.studentID == william.studentID) // Works Array of structures - Correct Answers ✅Structures can be defined as arrays const int NUM_STUDENTS = 20; Student stuList[NUM_STUDENTS]; Accessing an array of structures - Correct Answers ✅Use its element cout << stuList[5].studentID; Enumerated Data Types - Correct Answers ✅A programmer defined data type. Consists of values known as enumerators, which represent integer constants 2 / 3
COSC 1436 Final Exam Questions and Verified Answers, 100% Guarantee Pass (Latest 2025) Defining Enumerated Data Types - Correct Answers ✅Create a variable for the created datatype Day workDay; Getting the address of a variable - Correct Answers ✅Use address operator & to get address of a variable int num = -99 int *numPtr = # Pointer Variable - Correct Answers ✅A variable that holds a memory address Using a reference variable - Correct Answers ✅Modifies the actual value of the variable being passed void getOrder(int &donuts){
cout << "How many donuts? : ";
cin >> donuts; }
Pointer variable definition - Correct Answers ✅Definition:
int *intPtr;
- / 3