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

Chapter 6 C++

Document preview thumbnail
Preview 2 out of 8 pages

Exam of 8 pages for the course Chapter 6 C++ at Chapter 6 C++ (Chapter 6 C++)

Content preview

Chapter 6 C++ GRADE A QUESTIONS WITH
ANSWER

A(n) ________ argument is passed to a parameter when the actual argument is left out
of the function call. - (correct answer)default



A function ________ eliminates the need to place a function definition before all calls to
the function. - (correct answer)prototype



This is a statement that causes a function to execute. - (correct answer)function call



EXIT_FAILURE and ________ are named constants that may be used to indicate
success or failure when the exit( ) function is called. - (correct answer)EXIT_SUCCESS



What is the output of the following program?

#include <iostream>

using namespace std;



int getValue (int);



int main()

{

int x= 2;

cout<< getValue (x)<< endl;

return 0;

}

int getValue (int num)
{

, return num +5;

} - (correct answer)7



In a function header, you must furnish:

1) data types of the parameters

2) the name of function

3) names of parameter variables

4) data type of the return value
5) all of these - (correct answer)all of these



A(n) ________ is information that is passed to a function, and a(n) ________ is
information that is received by a function. - (correct answer)argument, parameter



What is the output of the following program?



#include <iostream>

using namespace std;



void showDub(int);



int main ()

{

int x=2;


showDub (x);

cout <<x<< endl;

return0;

Document information

Uploaded on
October 26, 2024
Number of pages
8
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$10.49

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
douglasmugwe82
5.0
(1)
Sold
2
Followers
0
Items
4215
Last sold
1 year 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