Term
what are the two components of the cpu? |
|
Definition
the control unit and the arithmatic logic unit |
|
|
Term
What is the purpose of the control unit? |
|
Definition
to use computer operations |
|
|
Term
What is teh fetch/decode/execute cycle? |
|
Definition
|
|
Term
Define fetch in the process? |
|
Definition
CPU fetches from main memory, the next instruction in the the sequence of program instructions |
|
|
Term
Define decode in the process of fetch, decode, execute? |
|
Definition
instruction is encoded into a number, control unit decodes it and generates an electronic signal |
|
|
Term
Define execute in the process of fetch, decode, execute? |
|
Definition
signal is routed to appropriate component of the computer (any device) causes component to perform operation |
|
|
Term
|
Definition
|
|
Term
What is secondary memory? |
|
Definition
any long term storage device |
|
|
Term
What are the five components of any computer system? |
|
Definition
1)CPU 2)Input 3)output 4)Main memory 5)Secondary storage |
|
|
Term
|
Definition
set of well defined steps for performing a task or solving a problem |
|
|
Term
|
Definition
C++ program can be written on one type and run on another with litle modification |
|
|
Term
|
Definition
statments written by programmer |
|
|
Term
|
Definition
set of code in C++ used for mathematic functions |
|
|
Term
What is the purpose of the preprocessor? |
|
Definition
It finds lines with #, allows it to modify the source code |
|
|
Term
What is the purpose of the compiler? |
|
Definition
translates source code to machine language and looks for syntax errors |
|
|
Term
What is the purpose of the linker? |
|
Definition
links the program to the run time library and makes the code executable |
|
|
Term
Define integrated development environment? |
|
Definition
includes text editor, compiler, debugger, and other utilities |
|
|
Term
|
Definition
specific meaning, can only be used for that purpose, always written in lower case |
|
|
Term
|
Definition
perofrm operations on one or more operands, i.e. a piece of data |
|
|
Term
|
Definition
the rules of a computer system |
|
|
Term
the use of the = sign can be called what? |
|
Definition
|
|
Term
|
Definition
named storage location in computer's memory for holding a piece of information |
|
|
Term
Where are variables stored? |
|
Definition
|
|
Term
what is the difference between variable definition and variable declaration? |
|
Definition
defintion always cause a variable to be placed in memory, declartions do not always have to |
|
|
Term
What are the 3 primary activities of a program? |
|
Definition
|
|
Term
|
Definition
mistakes that cuase a program to produce erroneous results |
|
|
Term
|
Definition
programmer reads part of the program and steps through each statment |
|
|
Term
what is the purpose of procedural programming? |
|
Definition
make a program that prodcues a specific task |
|
|
Term
what is the function of // ? |
|
Definition
beginning of a comment, ignored by computer, runs to end of line |
|
|
Term
define a preprocessor directive? |
|
Definition
i.e. #, preprocessor reads program, looks for #, and only executes those lines, 'set up' to compiler |
|
|
Term
what is the purpose of the iostream? |
|
Definition
a files that allows C++ to display out on screen and read from keyboard |
|
|
Term
what is the purpose of the namespace std? |
|
Definition
declares that program will be accessing entries whose names are part of the namespace called std, must be set with entities in the iostream |
|
|
Term
what is the purpose of int main ()? |
|
Definition
this is the beginnig of a function, starting point of the program |
|
|
Term
what is a string literal or string constant? |
|
Definition
the characters inside quotation marks |
|
|
Term
what is the purpose of return 0; ? |
|
Definition
sends the interger value 0 back to OS upon completion, 0 usually indicates success |
|
|
Term
|
Definition
marks beginning of preprocessor directive |
|
|
Term
|
Definition
encloses a filename, used with # include directive |
|
|
Term
|
Definition
used in naming function, i.e. int main () |
|
|
Term
|
Definition
enclsoes a group of statments |
|
|
Term
what is a variable definition and give an example? |
|
Definition
int number, assigning a definition to a variable |
|
|
Term
what is the difference between a string literal and an integer literal? |
|
Definition
|
|
Term
what are the 2 rules for legal identifiers (1 of 2)? |
|
Definition
1) first character underscore or a-z or A-Z, |
|
|
Term
what are the 2 rules for legal identifiers (2 of 2)? |
|
Definition
2) after first character, a-z, A-Z, underscore 0-9 |
|
|
Term
what is the purpose of an unsigned data type? |
|
Definition
only to store non-negative numbers |
|
|
Term
how can you define two variables (i.e. x and y) in one line? |
|
Definition
|
|
Term
how do you force an integer literal to be stored as a long integer, i.e 32? |
|
Definition
|
|
Term
what does ASCII stand for? |
|
Definition
american standard code for information |
|
|
Term
|
Definition
essentially its an integer data type |
|
|
Term
how do you define a char literal, i.e. x? |
|
Definition
char letter; letter= 'x'; |
|
|
Term
How is a string (i.e. ghost) stored? |
|
Definition
it is stored consecutively in memory, ghost\0 = 6 bytes |
|
|
Term
|
Definition
a string of characters stored in memory with null terminator of the number 0 |
|
|
Term
what is a floating point number? |
|
Definition
any real number i.e. fractional |
|
|
Term
|
Definition
the actual number in scientific notation, 4.6e10-> the mantissa is 4.6 |
|
|
Term
define float (single precision)? |
|
Definition
|
|
Term
define double (double precision)? |
|
Definition
+/- 1.7E-308 to positive E-308 |
|
|
Term
Define long double precision (long double)? |
|
Definition
1.7E-308 to positive but in some computers +/-3.4E-4932 to +/-1.1E4832 |
|
|
Term
is there such thing as an unsigned floating point data type? |
|
Definition
No, because float, double and long double store negative numbers also |
|
|
Term
how are floating point literals stored in memory? |
|
Definition
|
|
Term
How do you force a literal to be stored as float? |
|
Definition
|
|
Term
How do you force a literal to be stored as a long double? |
|
Definition
|
|
Term
What happens when you assign a floating point to an integer variable such as int i; float f; f=7.5; i=f? |
|
Definition
i=7, it is truncated and not rounded |
|
|
Term
What happens if a floating point is stored as an integer and the floating point is too large? |
|
Definition
an invalid value will be stored |
|
|
Term
What is a boolean variable? |
|
Definition
set to either true or false |
|
|
Term
define initialization, give an example? |
|
Definition
declaring a variable and assigning it at the same time; i.e. int month; int days; month=2, days=30 OR int month=2, days=30 |
|
|
Term
|
Definition
part of the program where the variable may be used, you can't expect to use the variable before you define it |
|
|
Term
what happens when you divide 2 integers, i.e. 17/3? |
|
Definition
the remainder is discarded |
|
|
Term
how would you divide 2 integers (17/3) and show remainder? |
|
Definition
make 17 floating point 17.0 |
|
|
Term
how do you open and close multi line comments? |
|
Definition
|
|