• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 2 out of 6 pages
Exam (elaborations)

CS280 Final Exam Study Guide With Complete Solutions

Document preview thumbnail
Preview 2 out of 6 pages

CS280 Final Exam Study Guide With Complete Solutions...

Content preview

CS280 Final Exam Study Guide With
Complete Solutions

In C++ and Java, it is possible to create an infinite loop out of while and do loops
but not for loops. - ANSWER False

The function header void SomeFunc(char arr[]); can be interchangeable with the
heading void SomeFunc(char* arr); - ANSWER True

The binding of actual parameters to formal parameters in C/C++ is by position. -
ANSWER True

The Environment Pointer (EP) is a variable maintained by the run-time system. It
always points at the base of the activation record instance of the currently
executing program unit. - ANSWER True

C++ supports multiple inheritance, but Java directly supports only single
inheritance. - ANSWER True

C++ provides two constructs, the class and the struct, which support directly
abstract data types - ANSWER True

The type of the reference, not the type of the object, is used to determine which
version of a method is invoked in a polymorphic reference. - ANSWER False

A C++ class that has at least one virtual function is an abstract class. - ANSWER
False

A switch statement in C++ or Java must have a default clause. - ANSWER False

In Java, all objects are allocated from the heap and accessed through reference
variables. - ANSWER True

What are the values of x, y and z after the execution of the following statements?
int x = 3;
int y = ++x; int z = x++;

a. x = 4, y = 4, z = 3
b. x = 5, y = 4, z = 4
c. x = 4, y = 3, z = 3
d. x = 5, y = 3, z = 4 - ANSWER B

, Consider the following C++ program, what is the output generated in the main
function, assuming operands are evaluated left to right in the statement at
position 1?
int fun (int x, int &y)
{
++x; y++; return x;
}
int main()
{
int k = 3, j = 11;
do {
j = j - fun(k, j);//position 1
cout << k <<", "<< j << ", ";
} while(++k < 5);
return 0;
}

a. 3, 7, 4, 2,
b. 4, 7, 5, 2
c. 3, 7, 5, 2
d. 4, 8, 5, 4 - ANSWER A

LOOK AT 3 - ANSWER A

What will be the value of x after the following statements are executed? int x =
12; switch (x) { case 10: x += 15; break; case 12: x -= 5; default: x *= 3; }

a. 15
b. 21
c. 27
d. 7 - ANSWER B

Individual entities in Java classes have access control modifiers, called visibility
modifiers, that are attached to method and variable definitions. These include:

a. public, private
b. public, private, protected
c. public, private, protected, final
d. public, private, protected, static - ANSWER B

A continue statement in C/C++ and Java

a. may be used within a while or a do-while loop but not a for loop
b. is identical to a break statement within loops
c. may be used within any loop statement

Document information

Uploaded on
April 9, 2026
Number of pages
6
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$14.49

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

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.
Zayla
3.2
(20)
Sold
163
Followers
13
Items
18660
Last sold
1 week ago



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