• 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 12 pages
Exam (elaborations)

CSCI 240 Exam 2 Questions with Verified Correct Answers

Document preview thumbnail
Preview 2 out of 12 pages

CSCI 240 Exam 2 Questions with Verified Correct Answers

Content preview

CSCI 240 Exam 2 Questions with Verified
Correct Answers
match the function header in number, order and data type

A function calling statement must supply arguments that ______.

function name, return type, argument types and argument names

Which of the following appear in a function header?

by executing a return statement with the answer

How does a function report its answer back to its calling (or boss) function?

include argument names

A function prototype does not have to _______.

they already have values provided by the calling function and are ready to be used

When the body of a function begins to execute what is true of its arguments?

False

A variable called score is declared in main(). main() calls a function UpdateScore to update

the score. UpdateScore also has a variable called score. When a value is added to score in

UpdateScore, the value of score in main() is also changed. T or F?

True

Prototype Statements are placed before int main(). T or F?

False

The function header and the calling statement must contain the name and the date type of the

arguments. T or F?

, True

The statement int main() means that main is a function that takes no arguments, and returns

an integer. T or F?

29

What is the subscript of the last element in the array table if it is defined as follows



float Table[30];

for (i = 0, i <25; i++)

cout << ar[i] << " ";

What C++ code will print the contents of an array called ar that has been defined to hold 25

integer values and has been initialized with 25 integer values?

False

The following is a valid array definition T or F?



int ar[];

2 4 6 9 10

What will be displayed with the following code?



int main()

{

int num[5] = {2, 4, 6, 8, 10};

int i;

Document information

Uploaded on
August 26, 2026
Number of pages
12
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$12.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.
KenAli
2.6
(18)
Sold
114
Followers
5
Items
23937
Last sold
6 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