100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

COSC 1436 C++ Chapter 6 Quiz with Correct Answers

Rating
-
Sold
-
Pages
5
Grade
A+
Uploaded on
03-11-2024
Written in
2024/2025

COSC 1436 C++ Chapter 6 Quiz with Correct Answers A function ________ eliminates the need to place a function definition before all calls to the function. - ANSWER-prototype Look at the following function prototype. int myFunction(double);int myFunction(double); What is the data type of the function's return value? - ANSWER-double A function's return data type must be the same as the function's parameter(s). - ANSWER-False If a function is called more than once in a program, the values stored in the function's local variables do not ________ between function calls. - ANSWER-persist Look at the following function prototype. int myFunction(double, double, double); int myFunction(double, double, double); How many parameter variables does this function have? - ANSWER-3 Local variables are initialized to zero by default. - ANSWER-False Copyright © KAYLIN 2024/2025 ACADEMIC YEAR. ALL RIGHTS RESERVED FIRST PUBLISH NOVEMBER, 2024 Copyright © Stuvia International BV Page 2/5 This is a statement that causes a function to execute. - ANSWER-function call A(n) ________ is information that is passed to a function, and a(n) ________ is information that is received by a function. - ANSWER-argument, parameter A function is executed when it is: - ANSWER-called Given the following function definition: What is the output of the following code fragment that invokes calc? - ANSWER-1 6 3 A static variable that is defined within a function is initialized only once, the first time the function is called. - ANSWER-True Look at the following function prototype. int myFunction(double);int myFunction(double); What is the data type of the function's parameter variable? - ANSWER-double - ANSWER-10 When a function is called, flow of control moves to the function's prototype. - ANSWER-False This statement causes a function to end. - ANSWER-return Copyright © KAYLIN 2024/2025 ACADEMIC YEAR. ALL RIGHTS RESERVED FIRST PUBLISH NOVEMBER, 2024 Copyright © Stuvia International BV Page 3/5 This type of variable is defined inside a function and is not accessible outside the function. - ANSWER-local Functions are ideal for use in menu-driven programs. When a user selects a menu item, the program can ________ the appropriate function. - ANSWER-call What is the output of the following program? Group of answer choices - ANSWER-2

Show more Read less
Institution
Cosc
Course
Cosc









Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
Cosc
Course
Cosc

Document information

Uploaded on
November 3, 2024
Number of pages
5
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

Copyright © KAYLIN 2024/2025 ACADEMIC YEAR. ALL RIGHTS RESERVED FIRST PUBLISH NOVEMBER, 2024




COSC 1436 C++ Chapter 6 Quiz with

Correct Answers


A function ________ eliminates the need to place a function definition before all calls to the function. -

ANSWER✔✔-prototype


Look at the following function prototype.


int myFunction(double);int myFunction(double);


What is the data type of the function's return value? - ANSWER✔✔-double


A function's return data type must be the same as the function's parameter(s). - ANSWER✔✔-False


If a function is called more than once in a program, the values stored in the function's local variables do

not ________ between function calls. - ANSWER✔✔-persist


Look at the following function prototype.


int myFunction(double, double, double); int myFunction(double, double, double);


How many parameter variables does this function have? - ANSWER✔✔-3


Local variables are initialized to zero by default. - ANSWER✔✔-False



Copyright © Stuvia International BV 2010-2024 Page 1/5

, Copyright © KAYLIN 2024/2025 ACADEMIC YEAR. ALL RIGHTS RESERVED FIRST PUBLISH NOVEMBER, 2024




This is a statement that causes a function to execute. - ANSWER✔✔-function call


A(n) ________ is information that is passed to a function, and a(n) ________ is information that is

received by a function. - ANSWER✔✔-argument, parameter


A function is executed when it is: - ANSWER✔✔-called


Given the following function definition:




What is the output of the following code fragment that invokes calc? - ANSWER✔✔-1 6 3


A static variable that is defined within a function is initialized only once, the first time the function is

called. - ANSWER✔✔-True


Look at the following function prototype.


int myFunction(double);int myFunction(double);


What is the data type of the function's parameter variable? - ANSWER✔✔-double


- ANSWER✔✔-10


When a function is called, flow of control moves to the function's prototype. - ANSWER✔✔-False


This statement causes a function to end. - ANSWER✔✔-return




Copyright © Stuvia International BV 2010-2024 Page 2/5

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.
MitchelleBanks Western Virginia University
View profile
Follow You need to be logged in order to follow users or courses
Sold
12
Member since
1 year
Number of followers
0
Documents
1265
Last sold
3 months ago
EXAMS TROUBLESHOOTER

On this page, you find all documents, package deals, and flashcards offered by seller KaylinHoffman.

3.5

2 reviews

5
1
4
0
3
0
2
1
1
0

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

Frequently asked questions