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)

CSCI 240 Final Exam Questions and Correct Verified Answers Latest Version

Rating
-
Sold
-
Pages
37
Grade
A+
Uploaded on
15-05-2026
Written in
2025/2026

CSCI 240 Final Exam Questions and Correct Verified Answers Latest VersionCSCI 240 Final Exam Questions and Correct Verified Answers Latest VersionCSCI 240 Final Exam Questions and Correct Verified Answers Latest VersionCSCI 240 Final Exam Questions and Correct Verified Answers Latest VersionCSCI 240 Final Exam Questions and Correct Verified Answers Latest VersionCSCI 240 Final Exam Questions and Correct Verified Answers Latest VersionCSCI 240 Final Exam Questions and Correct Verified Answers Latest VersionCSCI 240 Final Exam Questions and Correct Verified Answers Latest VersionCSCI 240 Final Exam Questions and Correct Verified Answers Latest VersionCSCI 240 Final Exam Questions and Correct Verified Answers Latest VersionCSCI 240 Final Exam Questions and Correct Verified Answers Latest Version

Show more Read less
Institution
CSCI 240
Course
CSCI 240

Content preview

1




CSCI 240 Final Exam Questions and
Correct Verified Answers Latest
Version
The class X contains two data members: an integer called xVal and a float

called xPerc. Which of the following is NOT a valid prototype for the class

definition for X?




a. void X( int, float );


b. void setxVal( int );


c. float getxPerc();


d. X( int, float );


e. void printX();


✓ a. void X( int, float );




An instance of a class is known as a/an .




a. variable


b. method


c. object

,d. thing


✓ c. object




The :: operator is used to associate a method with a specific class.




a. true


b. false


✓ a. true




Which of the following statements (a-d) about classes is true?




a. A class can contain both data members and methods


b. The members of a class may be private or public


c. The name of the constructor is always the same as the name of the class


d. The class definition contains prototype statements for the methods


e. All of the statements (a-d) are true.


✓ e. All of the statements (a-d) are true.




If a string will need room for 25 characters, how should it be defined so that it

will be a valid string?

,a. char mstr[25];


b. char mstr[24];


c. char mstr[26];


d. char mstr[];


✓ c. mchar mstr[26];




Which mof mthe mfollowing mstring mfunctions mwill mALWAYS mproduce ma mvalid mstring

after mexecution?
m




a. strcpy


b. strcat


c. Both mof mthe mfunctions m(a-b) mwill mproduce ma mvalid mstring


✓ c. mBoth mof mthe mfunctions m(a-b) mwill mproduce ma mvalid mstring




The mnull mterminator mis m .




a. used mto madvance mto ma mnew mline mwhen mexecuting ma mcout mstatement


b. represented mas m'\0'



Master01 m | m September, m 2024/2025 m | m Latest m update

, 1 m| mP ma mg me m | m© mcopyright m2024/2025 m| mGrade mA+

c. used mto mend ma mvalid mstring


d. a mmovie mstarring mArnold mSchwarzenegger


e. All mof mthe mstatements m(a-d) mare mcorrect


f. Only mstatements mb mand mc mare mcorrect


✓ f. mOnly mstatements mb mand mc mare mcorrect.




Which mof mthe mfollowing mis mthe mcorrect mdefinition mfor ma mvariable mcalled mdblRef

that mcan mhold ma mreference mto mthe mdouble mvariable mdblNum?
m




a. double mdblRef m= mdblNum;


b. double m *dblRef m = m &dblNum;


c. double m&dblRef m= mdblNum;


d. double m&dblRef;


✓ c. mdouble m&dblRef m= mdblNum;




Which mof mthe mfollowing mstatements m(a-d) mare mtrue mif mthe mfollowing mlines mof

code mare mexecuted?
m




int mG m= m17;


int m&H m= mG;

Master01 m | m September, m 2024/2025 m | m Latest m update

Written for

Institution
CSCI 240
Course
CSCI 240

Document information

Uploaded on
May 15, 2026
Number of pages
37
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$16.49
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

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.
prosmartprep stuvia
View profile
Follow You need to be logged in order to follow users or courses
Sold
11
Member since
1 year
Number of followers
0
Documents
1102
Last sold
5 days ago

5.0

1 reviews

5
1
4
0
3
0
2
0
1
0

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