C++ Chapter 6

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

Which line in the following program contains the header for the showDub function? 1 #inclue <iostream> 2 using namespace std; 3 4 void showDub (int); 5 6 int main() 7 { 8 int x = 2; 9 10 showDub(x); 11 cout << x << endl; 12 return 0; 13 } 14 15 void showDub(int num) 16 { 17 cout << (num * 2) << endl; 18 }

15

8. What is the output of the following program? #include <iostream> Using namespace std; Void doSomething (int); Int main() { Int x = 2 Cout << x << endl; doSomething (x); cout << x<< endl; return 0; } Void doSomething(int num) { Num = 0; Cout << num << endl; }

2 0 2

EXIT_FAILURE and _____ are named constants that may be used to indicate success or failure when the exit() function is called.

EXIT_SUCCESS

True/False: Local variables are initialized to zero by default.

False

True/False: A static variable that is defined within a function is initialized only once, the first time the function is called.

True

It is a good programming practice to _________ your functions by writing comments that describe what they do.

document

This is a statement that causes a function to execute.

function call

Look at the following function prototype. Int myFunction(double);

int

When used as parameter, these types of variables allow a function to access the parameter's original argument.

reference

This is a dummy function that is called instead of the actual function it represents.

stub


संबंधित स्टडी सेट्स

Intro to Veterinary Nursing and Procedures Week 1 - Small Animal Chapter 2 Review Questions

View Set

CHAPTER 13 CONVEYING FREEHOLD ESTATES BY DEED

View Set

15: International Public Law & Dispute Resolution

View Set

NU 302 Beginning Diagnostic Exam (questions I missed)

View Set