Shared Flashcard Set

Details

C++ Basics: Functions
Introduction to Functions
10
Computer Science
Undergraduate 1
03/15/2013

Additional Computer Science Flashcards

 


 

Cards

Term
Function Call
Definition
Term
Function Implementation
Definition
Term
Arguments
Definition
Term

Arrays through functions:

Spot the error if one exists.

void displayArray(int passingArray[], int SIZE);

 

int main()

{

       int anArray[SIZE] =  {1, 2, 3, 4};

       displayArray(anArray, SIZE);

       return 0; 

}

 

displayArray(int passingArray[], int SIZE)

{

      for (int i = 0; i < SIZE; i++)

      {

            cout << passingArray[i] << endl;

      }

}

Definition
Term



What arguments are needed to pass an array through a funtion?

Definition

 

The address and size of the array.

 

void displayArray(int passingArray[], int SIZE);

Term

 

 

What arguments are needed to pass a 2-dimensional array through a function?

Definition

The address of the rows, and the size of the columns.

 

Term

Identify the following as a function call, implementation, or prototype.




int getPhoneNumber(int number[], int SIZE);

Definition
Function Prototype.
Term

Identify the following as a function call, implementation, or prototype.


PhoneNumber = setNumber(number, SIZE);

Definition
Function Call
Term

Identify the following as a function call, implementation, or prototype.

 

void displayAddress(string address)

{

        cout << address;

}

Definition
Function implementation.
Term
Function Prototype
Definition
Supporting users have an ad free experience!