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
Document preview thumbnail
Preview 3 out of 17 pages
Exam (elaborations)

COP 3330 EXAM 1 CORE PROGRAMMING FUNDAMENTALS AND C.pdf

Document preview thumbnail
Preview 3 out of 17 pages

COP 3330 EXAM 1 CORE PROGRAMMING FUNDAMENTALS AND C.pdf

Content preview

COP 3330 EXAM 1 CORE PROGRAMMING
FUNDAMENTALS AND C++ BASICS REVIEW
2026

◉ There may be more than one correct answer. When you define a
C++ class so that the result is an ADT, which of the following remarks
about whether to make a member variable or function public or
private are correct?
a. Don't make member variables public.
b. Make them all public. It simplifies life and makes things more
efficient to be able access members anywhere.
c. Make all member functions public.
d. There are some member functions that shouldn't be public, but
most should be public..
Answer: a. Don't make member variables public
d. There are some member functions that shouldn't be public, but
most should be public.


◉ The following definition of the structure variables of type
myStruct s and t could be made using several definitions using the
structure tag.
struct myStruct
{

,int i;
double d;
} s, t;
True or False.
Answer: True


◉ There may be more than 1 correct answer.
Concerning nested classes, which of the following are true?
a. The inner class must always be public
b. The inner class is within the scope of the outer class.
c. Qualification by the outer class name with the scope resolution
operator is necessary to use the inner class outside the outer class.
d. A local class can contain static members.
e. You can define a class within a class..
Answer: b. The inner class is within the scope of the outer class.
c. Qualification by the outer class name with the scope resolution
operator is necessary to use the inner class outside the outer class.
e. You can define a class within a class.


◉ There may be more than 1 correct answer.
A constructor ....
a. can only be used to initialize

, b. can do anything other method can do
c. must initialize all member variables
d. usually initializes all or most member variables.
Answer: b. can do anything any other method can do
d. usually initializes all, or most, member variables.


◉ A constructor can be called implicitly or explicitly. (Implicitly
means the compiler did it for you.) In the interest of uniformity in
answers, please use classA; for your examples.
True or False.
Answer: True


◉ size and capacity of a vector are two names for the same thing.
True or False.
Answer: False


◉ If we use an out of range index with a vector, there be an error
message from the compiler.
True or False.
Answer: False


◉ There may be more than 1 correct answer.

Document information

Uploaded on
August 3, 2026
Number of pages
17
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$13.99

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.
EddieJessup
3.0
(1)
Sold
16
Followers
1
Items
7349
Last sold
2 days 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