Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

CSE240 - FINAL EXAM QUESTIONS AND ANSWERS WITH COMPLETE SOLUTIONS VERIFIED GRADED A++

Rating
-
Sold
-
Pages
16
Grade
A+
Uploaded on
05-11-2024
Written in
2024/2025

CSE240 - FINAL EXAM QUESTIONS AND ANSWERS WITH COMPLETE SOLUTIONS VERIFIED GRADED A++ In an array-implemented queue class, what members should be declared as "public" members? queue_size the array of buffer front and rear index variables enqueue and dequeue functions enqueue and dequeue functions The purpose of the scope resolution operator is to allow a function to be - implemented using recursion. placed inside the class. placed outside the class. a global function. placed outside the class. What are the key features of object orientation in programming languages? Select all that apply Dynamic memory allocation Encapsulation of state How is Java's garbage collection implemented? It uses a reference counter to indicate if an object is still referenced by any variable. If a function calls another function, the local variables in these two functions use the memory from? different stack frames. same stack frames. static heap different stack frames. Given the snippet of code: int x = 7; int bar(int j) { int *k = 0, a = 6;k = &a; return (j+a); } void main(void) { static int i =0; i++; i = bar(i) + x; } Which variables obtain their memory from the stack? Select all that apply i j k a x

Show more Read less
Institution
Course

Content preview

CSE240 - FINAL EXAM QUESTIONS AND ANSWERS WITH

COMPLETE SOLUTIONS VERIFIED GRADED A++


In an array-implemented queue class, what members should be declared as

"public" members?

queue_size

the array of buffer

front and rear index variables

enqueue and dequeue functions

enqueue and dequeue functions

The purpose of the scope resolution operator is to allow a function to be -

implemented using recursion.

placed inside the class.

placed outside the class.

a global function.

placed outside the class.

What are the key features of object orientation in programming languages? Select

all that apply

Dynamic memory allocation

Encapsulation of state

How is Java's garbage collection implemented?

It uses a reference counter to indicate if an object is still referenced by any variable.

,If a function calls another function, the local variables in these two functions use

the memory from?

different stack frames.

same stack frames.

static

heap

different stack frames.

Given the snippet of code:

int x = 7;

int bar(int j) {

int *k = 0, a = 6;k = &a;

return (j+a);

}

void main(void) {

static int i =0;

i++;

i = bar(i) + x; }

Which variables obtain their memory from the stack? Select all that apply

i

j

k

a

x

, j, k, a

What is the best way of deleting a linked list of objects in C++?

Use a loop to delete every object in the linked list.

What is the best way of deleting an array created by "p = new StructType[size];"

in C++?

delete[] p;

What members of a base class can be redefined in the derived classes?

virtual members

In the implementation of the getMax() function in the PriQueue class, we need to

read and write the variables "front" and "rear", which are defined as protected

members in the base class Queue. Are the functions in the derived class allowed

to access the protected members in the base class?

yes, always

If a class needs to inherit from multiple parent classes, the parent classes must?

a)not contain overlapped members.

b)be defined as interface classes only.

c)contain virtual functions only.

d)be inherited as virtual classes.

If A is the base class and B is a class derived from A, and x and y are pointers to

objects of A and B, respectively, which assignment statement can pass the

compiler check?

x=y;

Written for

Course

Document information

Uploaded on
November 5, 2024
Number of pages
16
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$10.99
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF


Also available in package deal

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
AcademicSuperScores Chamberlain College Of Nursing
Follow You need to be logged in order to follow users or courses
Sold
299
Member since
3 year
Number of followers
37
Documents
7648
Last sold
1 week ago
AcademicSuperScores

NURSING, ECONOMICS, MATHEMATICS, BIOLOGY AND HISTORY MATERIALS. BEST TUTORING, HOMEWORK HELP, EXAMS, TESTS AND STUDY GUIDE MATERIALS WITH GUARANTEE OF A+ I am a dedicated medical practitioner with diverse knowledge in matters Nursing and Mathematics. I also have an additional knowledge in Mathematics based courses (finance and economics)

4.6

156 reviews

5
125
4
9
3
11
2
5
1
6

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions