Save
Upgrade to remove ads
Busy. Please wait.
Log in with Clever
or

show password
Forgot Password?

Don't have an account?  Sign up 
Sign up using Clever
or

Username is available taken
show password


Make sure to remember your password. If you forget it there is no way for StudyStack to send you a reset link. You would need to create a new account.
Your email address is only used to allow you to reset your password. See our Privacy Policy and Terms of Service.


Already a StudyStack user? Log In

Reset Password
Enter the associated with your account, and we'll email you a link to reset your password.
focusNode
Didn't know it?
click below
 
Knew it?
click below
Don't Know
Remaining cards (0)
Know
0:00
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.

  Normal Size     Small Size show me how

03 mod 7

QuestionAnswer
a group of statements that is executed when it is called from some point of the program function
a self contained block of code with a specific purpose function
It has a name that is used to identify and call it for execution function
subprogram that acts on data and often returns a value function
• easier to maintain, • update and • debug than one very long program advantages of function
By programming in a modular (functional) fashion, several programmers can work independently on separate functions which can be assembled at a later date to create the entire project True
One function that every C++ program possesses: __________ int main()
The program that calls a function is often referred to as the ___________ calling program
programmed routine that has its parameters set by the user of the system user defined function
functions that perform specific tasks within a larger system, such as a database or spreadsheet program User defined functions
return_type function_name(parameter_list ) { local_definitions; function_implementation; } e standard form of declaration of a function
If the function returns a value then the type of that value must be specified in _____________ return_type
If the function does not return a value then the return_type must be __________ void
follows the same rules of composition as identifiers. function_name
lists the formal parameters of the function together with their types parameter_list
definitions of variables that are used in the function_implementation. These variables have no meaning outside the function local_definitions
consists of C++ executable statements that implement the effect of the function function_implementation
main parts of the function: The function ________ and the function __________ header and body
int sum(int x, int y) function header
•The name of the function i.e. sum •The parameters of the function enclosed in paranthesis •The return value type i.e. int three main parts
written in { } body of the function
It provides the basic information about a function which tells the compiler that the function is used correctly or not function prototype
It contains the same information as the function header contains function prototype
It can be used to check the calls to the function for the proper number of parameters and the correct types of parameters function prototype
The only difference between the header and the prototype is the _______ semicolon ;.
function that can be made to return a single value to the calling program is referred to as __________ non-void function.
function that is written to perform specific task and return multiple values to calling program void functions
variables/values used within the function call Actual arguments
variables used within the function header that receives the copy of the actual argument values formal parameters
The number of actual arguments must be the same as the number of formal parameters True
The correspondence between actual and formal parameter is __________ basis according to the respective orders one-to-one
This means that when calling a function with parameters, what we have passed to the function were copies of their values but never the variables themselves pass by value
In some cases where you need to manipulate from inside a function the value of an external variable we can use arguments __________ passed by reference
In the declaration, the type of each parameter was followed by an ___________ to specify that their corresponding arguments are to be passed by reference instead of by value ampersand sign (&)
A function that calls itself is known as a ____________ recursive function
function call in which the function being called is the same as the one making the call. Recursive call
programming technique in which procedures and functions call themselves Recursion
The case for which the solution can be stated non-recursively The case for which the answer is explicitly known Base case
The case for which the solution is expressed in smaller version of itself. Also known as recursive case. General Case
Also known as recursive case. General Case
In recursion, it is essential for a function to call itself, otherwise recursion will not take place True
Only user define function can be involved in recursion. True
To stop the recursive function it is necessary to base the recursion on test condition and proper terminating statement such as exit() or return must be written using if() statement. True
When a recursive function is executed, the recursive calls are not implemented instantly. All the recursive calls are pushed onto the stack until the terminating condition is not detected, the recursive calls stored in the stack are popped and execu True
During recursion, at each recursive call new memory is allocated to all the local variables of the recursive functions with the same name. True
• It makes our code shorter and cleaner. • Complex code and nested for loops are avoided here. • Recursion is required in problems concerning data structures and Advantages of C++ Recursion
It takes a lot of stack space compared to an iterative program. • It uses more processor time. • It can be more difficult to debug compared to an equivalent iterative program. advanced algorithms, such as Graph and Tree Traversal. Disadvantages of C++ Recursion
Created by: ellies
 

 



Voices

Use these flashcards to help memorize information. Look at the large card and try to recall what is on the other side. Then click the card to flip it. If you knew the answer, click the green Know box. Otherwise, click the red Don't know box.

When you've placed seven or more cards in the Don't know box, click "retry" to try those cards again.

If you've accidentally put the card in the wrong box, just click on the card to take it out of the box.

You can also use your keyboard to move the cards as follows:

If you are logged in to your account, this website will remember which cards you know and don't know so that they are in the same box the next time you log in.

When you need a break, try one of the other activities listed below the flashcards like Matching, Snowman, or Hungry Bug. Although it may feel like you're playing a game, your brain is still making more connections with the information to help you out.

To see how well you know the information, try the Quiz or Test activity.

Pass complete!
"Know" box contains:
Time elapsed:
Retries:
restart all cards