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


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

Computer Science 250

Chapter 11

QuestionAnswer
What is a primitive data type? A data type that is defined as a basic part of the language. Ex. bool, char, int, short int, long int, double, float, etc.
What is an abstract data type? a data type created by the programmer and is composed of one or more primitive data types
an example of a structure declaration. struct PayRoll { int empNumber; string name; double hours, payRate, grossPayl };
is it possible to definre multiple structure variables in a program? yes.
assume that PayRoll is a Structure Declaration, how would you define three variables to it? The three variables are deptHead, foreman, and associate. PayRoll deptHead, foreman, associate;
what operator allows you to access structure members in a program? the dot operator (.)
what does this statement do? deptHead.empNumber = 475; the number 475 is assigned to the empNumber member of the deptHead. The dot operator connects the name of the member variable with the name of the stricture variable it belongs to.
how could you initialize this structure? struct CityInfo { string cityName; string state; long population; int distance; }; use an initialization list. CityInfo location = {"Asheville", "NC", 50000, 28};
Do you have to initialize all members of the structure variable? struct CityInfo { string cityName; string state; long population; int distance; }; No. for example, CityInfo location = {"Tampa"};
Define the example as an array. struct BookInfo { string title; string author; string publisher; double price; }; BookInfo bookList[20];
You can access a member of any element in an array of a structure variable. How would you write this? bookList[5].title
How would you initialize a structure array? PayInfo workers[NUM_WORKERS] = { {10, 9.75}; {15, 8.62}; {20, 10.50}; };
True or false, It is possible for a structure variable to a member of another strucutre variable. true
True or False. Strucutre variables cannot be passed as arguments to functions false
Why should large structures be passed by reference? Because passing by value will decrease the speed and overall performance of your code.
what is a disadvantage of passing a structure by reference? the function that the structure has been passed into has access to the original argument. This means that the data of the structure could potentially be altered.
how would you define a variable that is a pointer to a structure? data type followed by an asterisk and then the name of the pointer variable. Ex. Circle *cirPtr;
When would you use the pointer operator (->) it is used to dereference a pointer to a structure, not a pointer that is a member f a structure.
What is a union? similar to a structure except all the members occupy the same memory area
What is an anonymous union? it is a union without a name. however, members of the union have names.
Created by: kcpaxton
Popular Computers sets

 

 



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