Download ITP132 Mid-Term Study Guide (Closed Book Portion, taken 1st) 1

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Corecursion wikipedia , lookup

Transcript
ITP132 Mid-Term Study Guide (Closed Book Portion, taken 1st)
1) Hardware refers to what?
2) Which of the following best describes an operator?
3) What does an Integrated Development Environment typically consists of?
4) Programmer-defined names of memory locations that may hold data are called __________________.
5) What is the definition of an operator?
6) The computer's main memory is commonly known as _________________.
7) A set of instructions that the computer follows to solve a problem is called _________________.
8) What do compilers do?
9) What is indicated by two slash marks ( // )?
10) What are two general categories of numeric data types in C++?
11) A preprocessor directive is indicated in C++ with what symbol?
12) Every opening brace in a C++ program must also have a _______________.
13) The ________ is/are used to display information on the computer's screen.
14) What is the modulus operator?
15) What is the output of the following statement? cout << 6 * (13 / (1 + 3)) << endl;
16) In programming terms, a group of characters inside a set of quotation marks is called a ______________________.
17) What symbol is used to mark the end of a complete C++ programming statement?
18)Which header file must be included in any C++ program that uses the cout object?
19)Can you compile and/or execute a C++ key word used as an identifier?
20) In this C++ instruction …….. given the following declaration statement, what is the value of variable x after it runs?
21) Which object causes a program to wait until information is typed at the keyboard and the Enter key is pressed?
22) You can use what symbols override the rules of operator precedence in a mathematical expression?
23) In the following C++ statement, what will be executed first according to the order of precedence? x= 6 - 4 * 8 + 7-10 / 5;
24) Which manipulator is used to establish a field width for the value immediately following it?
25) Which symbols always follows the cin object, and which symbols always follows the cout object?
26) Which header file must you #include in any program that uses the cin object?
27) How can you reads an entire line of input, including leading and embedded spaces, and stores it in a string object?
28) Which operator is used with string operands to concatenate them, or join them together?
29) This function tells the cin object to skip one or more characters in the keyboard buffer.
30) When you use the function, pow(x, 5.0), which header file must be included?
31) Relational operators allow you to _______________________ numbers.
32) What will the following segment of code output?
33) Which operators add and subtract one from their operands?
34) A loop that is inside another loop is called __________________________.
35) A variable that is regularly incremented or decremented each time a loop iterates is a ___________________.
36) This is a special value that marks the end of a list of values.
37) This means to increase a value by one.
38) This is a control structure that causes a statement or group of statements to repeat.
39) The ________________ loop contains an expression that is tested for a true or false value, and a statement or block that
is repeated as long as the expression is true.
40) What is the output of the following code segment?
41) The while loop has two important parts _______________________________ and ______________________________.
42) What is the difference between a while loop and a do-while loop?
43) This operator represents the logical AND.
44) This operator takes an operand and reverses its truth or falsehood.
45) Assuming x is 5, y is 6, and z is 8, which of the following is false? (there is more than one correct answer here)
46) After execution of the following code, what will the value of input_value be if the user presses 0?
47) Predict the output of the following code segment after the user enters 0 at the keyboard?
48) When a relational expression is false, it has the value ________.
49) What be the output of the following segment of code?
50) When an if statement is placed within the conditionally-executed code of another if statement, this is known as what?
ITP132 Mid-Term Study Guide (Open Book Portion, taken 2nd)
1) This is used in a program to mark the beginning or ending of a statement, or separate items in a list.
2) A set of well-defined steps for performing a task or solving a problem is known as a(n):
3) The statements written by the programmer are called ___________________ code.
4) The two internal parts of a CPU consists of:
5) Even when there is no power to the computer, data can be held in what type of storage device?
6) Words that have a special meaning and may be used only for their intended purpose are known as _______________.
7) This is a complete instruction that causes the computer to perform some action.
8) A variable declaration announces the name of a variable that will be used in a program, as well as _________________.
9) An example of a secondary storage device is a ____________________________.
10) Mistakes that cause a running program to produce incorrect results are called _______________________.
11) Which character signifies the beginning of an escape sequence?
12) The manipulator used to establish a field width for the value immediately following it is ____________________.
13) Which does the following statement actually do?
cout << setw(9) << num1 << " ";
14) What is the value of average after the following code executes?
15) Choose which statement is equivalent to another statement,such as x = x + 1;
16) Choose which statement is equivalent to another statement (similar to question 15).
17) The total number of digits that appear before and after the decimal point is sometimes referred to as what?
18) Which stream manipulator forces cout to print the digits in fixed-point notation?
19) Which header file much you include when using the sqrt function?
20) This manipulator causes the field to be left-justified with padding spaces printed to the right. (it's in the book)
21) Which statement will read an entire line of input into the following string object?
22) In the C++ instruction, given the following declaration statement …… what is the value of x after execution?
23) Which C++ function allows you to identify how many bytes of storage on a computer system as an integer data value?
24) Character constants in C++ are always enclosed in what type(s) of punctuation?
25) The float data type is considered ________ precision, and the double data type is considered ________ precision.
26) A variable whose value can be either true or false is of data type: __________________________.
27) A variable's __________ is the part of the program that has access to the variable.
28) Every complete C++ program must have a main function. True or False???
29) This control sequence is used to skip over to the next horizontal tab stop.
30) Which one of the following would be an illegal variable name?
31) These operators connect two or more relational expressions into one, or reverse the logic of an expression.
32) This statement lets the value of a variable or expression determine where the program will branch to.
33) Without this statement appearing in a switch construct, the program "falls through" all of the statements below the
one with the matching case expression.
34) Whereas < is called a relational operator, x < y is called a(n) ________ expression.
35) This operator is used in C++ to represent equality.
36) In C++ the = operator indicates what?
37) Using this code and syntax, what will the following segment of code output if 22 is entered at the keyboard?
38) When a program lets the user know that an invalid choice has been made, this is known as _______________________.
39) The ________ of a variable is limited to the block in which it is declared.
40) What is the value of the following expression?
true && false
41) A for statement contains three expressions: _____________________, __________________, and ___________________.
42) The do-while loop is considered a(n) ________- test loop. (post-test or
pre-test)
43) Which loop is a good choice when you know how many times you want the loop to iterate in advance?
44) This is a pre-test loop that is ideal where you do not want the loop to iterate if the beginning condition is false.
45) Which statement causes a loop to terminate early?
46) To allow file access in a program, you must #include this header file.
47) This may be used to write information to a file.
48) To write data to a file, you define an object of this data type.
49) A file must be ________ before data can be written to or read from it.
50) The decimal number 21 is easily converted to binary number ________________________.