Busy. Please wait.
or

show password
Forgot Password?

Don't have an account?  Sign up 
or

Username is available taken
show password

why


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.
We do not share your email address with others. It is only used to allow you to reset your password. For details read 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.

Remove Ads
Don't know
Know
remaining cards
Save
0:01
To flip the current card, click it or press the Spacebar key.  To move the current card to one of the three colored boxes, click on the box.  You may also press the UP ARROW key to move the card to the "Know" box, the DOWN ARROW key to move the card to the "Don't know" box, or the RIGHT ARROW key to move the card to the Remaining box.  You may also click on the card displayed in any of the three boxes to bring that card back to the center.

Pass complete!

"Know" box contains:
Time elapsed:
Retries:
restart all cards




share
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