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 – complete exam material

Rating
-
Sold
-
Pages
37
Grade
A+
Uploaded on
27-01-2026
Written in
2025/2026

This document contains final exam material for CSCI 240, covering the core topics addressed throughout the course. It is suitable for exam preparation and review, helping students consolidate key concepts likely to appear on the final assessment.

Show more Read less
Institution
CSCI Jj 240
Course
CSCI jj 240

Content preview

CSCI240FinalExamQuestionsand
j j j j j




CorrectVerifiedAnswersLatest
jj j j j




Version jj




The jjclass jjX jjcontains jjtwo jjdata jjmembers: jjan jjinteger jjcalled jjxVal jjand jja jjfloat

called jjxPerc. jjWhich jjof jjthe jjfollowing jjis jjNOT jja jjvalid jjprototype jjfor jjthe jjclass
jj




definition jjfor jjX?
jj




a. void jjX( jjint, jjfloat jj);


b. void jjsetxVal( jjint jj);


c. float jjgetxPerc();


d. X( jjint, jjfloat jj);


e. void jjprintX();


✓ a. jjvoid jjX( jjint, jjfloat jj);




An jjinstance jjof jja jjclass jjis jjknown jjas jja/an jj .




a. variable


b. method


c. object

,d. thing


✓ c. jjobject




The jj:: jjoperator jjis jjused jjto jjassociate jja jjmethod jjwith jja jjspecific jjclass.




a. true


b. false


✓ a. jjtrue




Which jjof jjthe jjfollowing jjstatements jj(a-d) jjabout jjclasses jjis jjtrue?




a. A jjclass jjcan jjcontain jjboth jjdata jjmembers jjand jjmethods


b. The jjmembers jjof jja jjclass jjmay jjbe jjprivate jjor jjpublic


c. The jjname jjof jjthe jjconstructor jjis jjalways jjthe jjsame jjas jjthe jjname jjof jjthe jjclass


d. The jjclass jjdefinition jjcontains jjprototype jjstatements jjfor jjthe jjmethods


e. All jjof jjthe jjstatements jj(a-d) jjare jjtrue.


✓ e. jjAll jjof jjthe jjstatements jj(a-d) jjare jjtrue.




If jja jjstring jjwill jjneed jjroom jjfor jj25 jjcharacters, jjhow jjshould jjit jjbe jjdefined jjso jjthat

it jjwill jjbe jja jjvalid jjstring?
jj

,a. char jjstr[25];


b. char jjstr[24];


c. char jjstr[26];


d. char jjstr[];


✓ c. jjchar jjstr[26];




Which jjof jjthe jjfollowing jjstring jjfunctions jjwill jjALWAYS jjproduce jja jjvalid jjstring

after jjexecution?
jj




a. strcpy


b. strcat


c. Both jjof jjthe jjfunctions jj(a-b) jjwill jjproduce jja jjvalid jjstring


✓ c. jjBoth jjof jjthe jjfunctions jj(a-b) jjwill jjproduce jja jjvalid jjstring




The jjnull jjterminator jjis jj .




a. used jjto jjadvance jjto jja jjnew jjline jjwhen jjexecuting jja jjcout jjstatement


b. represented jjas jj'\0'

, c. used jjto jjend jja jjvalid jjstring


d. a jjmovie jjstarring jjArnold jjSchwarzenegger


e. All jjof jjthe jjstatements jj(a-d) jjare jjcorrect


f. Only jjstatements jjb jjand jjc jjare jjcorrect


✓ f. jjOnly jjstatements jjb jjand jjc jjare jjcorrect.




Which jjof jjthe jjfollowing jjis jjthe jjcorrect jjdefinition jjfor jja jjvariable jjcalled jjdblRef

that jjcan jjhold jja jjreference jjto jjthe jjdouble jjvariable jjdblNum?
jj




a. double jjdblRef jj= jjdblNum;


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


c. double jj&dblRef jj= jjdblNum;


d. double jj&dblRef;


✓ c. jjdouble jj&dblRef jj= jjdblNum;




Which jjof jjthe jjfollowing jjstatements jj(a-d) jjare jjtrue jjif jjthe jjfollowing jjlines jjof

code jjare jjexecuted?
jj




int jjG jj= jj17;


int jj&H jj= jjG;

Written for

Institution
CSCI jj 240
Course
CSCI jj 240

Document information

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

Subjects

R326,39
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
NERSEJUDY9

Get to know the seller

Seller avatar
NERSEJUDY9 stuvia
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
4 months
Number of followers
0
Documents
37
Last sold
-

0,0

0 reviews

5
0
4
0
3
0
2
0
1
0

Trending documents

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 exams and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can immediately select a different document that better matches what you need.

Pay how you prefer, start learning right away

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

Student with book image

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

Alisha Student

Frequently asked questions