Save
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

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.

Question

1.The value of RAND_MAX varies with different systems, but its value is always at least __.
click to flip
focusNode
Didn't know it?
click below
 
Knew it?
click below
Don't know

Question

1.You should ___ the random number generator in each program in which it is used; otherwise it will generate the same series of numbers each time the program is executed.
Remaining cards (34)
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

C++ ch9 study#2

C++ ch9 study #2

QuestionAnswer
1.The value of RAND_MAX varies with different systems, but its value is always at least __. 32,767
1.You should ___ the random number generator in each program in which it is used; otherwise it will generate the same series of numbers each time the program is executed. initialize
1.You initialize the random number generator using the ____ function. srand()
1.The srand() function is a ___ function, meaning it doesn't return a value. void
1.The ___ function is a value-returning function that returns the current time(according to your computer systems clock) as seconds elapsed since midnight on January 1, 1970. time()
1.To use the time() function in a program, the program must contain the ____ directive. #include <ctime>
1.In this book, functions you create are referred to as _____ functions, because the function definitions are contained in the program itself rather than in a different file. program-defined
The first line in a function definition is called the ____, because it appears at the top of the function. function header
1.A function header doesn't end with a semicolon. TRUE/FALSE? TRUE
The ____ store the information passed to the function when the function is invoked. formal parameters
1.The items of information you send(pass) to a function are called ___. actual arguments
1.Passing a variable's value is referred to as _____. passing by value
1.Passing a variables address is referred to as _________. passing by reference
1.Unless you specify otherwise, values in C++ are passed by ____. value
1.The ____ contains the instructions the function must follow to perform its assigned task. function body
In most cases, the last statement in the function body of a value returning function is __ return
1.The ___ statement alerts the computer that the function has completed its task. return
1.A _____ is a statement that specifies the function's name, the data type of its return value(if any) and the data type of each of its formal parameters. function prototype
1. The function prototype is usually at the ___ of the program. (beginning, middle, end) beginning
1.The function prototype doesn't end with a semicolon. TRUE/FALSE FALSE
1.The names of the formal parameters do not need to be identical to the names of the corresponding actual arguments. TRUE/FALSE TRUE
1.A(n) variable's ___ indicates where in the program the variable can be used. scope
1.A(n) variable's ___ on the other hand indicates how long the variable remains in the computer's internal memory. lifetime
1.Variables declared within a function and those that appear in a function's parameter list have a local scope and are referred to as _____. local variables
____ are declared outside of any function in the program and they remain in memory until the program ends. global variables
1.A (n)____ function is a function that doesn't return a value after completeing its assigned task. void
1.Each ____ you create in a program has both a value and a unique address that represents the location of the ___ in the computers internal memory. variable
1.Passing by _____ gives the receiving function access to the variable being passed. reference
1.To pass a variable by reference in C++, you include an ampersand(&) called the __ before the name of the corresponding formal parameter in the receiving function's header. address-of-operator
1.The ____ tells the computer to pass the variable's address rather than its contents. ampersand
1.A (n)____ variable also called a ____ variable is one that is unrelated to any other variable in the computers internal memory. simple, scalar
1.A(n) ___ is a group of variables that have the same name and data type and are related in some ways. array
1.An array that can be visualized as a column is a ___. one dimensional array
1.A unique number called a ____ identifies each variable in a one dimensional array. subscript
1.The first variable in a one-dimensional array is assigned a subscript of ___. 0
Created by: kat1350
 

 



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