C++ Demystified(c) A Self-Teaching Guide
-
What is a computer program?
-
What is a programming language?
-
What is a function?
-
How many main functions should a C++ program have?
-
What is a standard library file?
-
What is the purpose of an include directive?
-
What does a preprocessor do?
-
What does a compiler do?
-
What does a linker do?
-
Which of the following types of memory is not temporary: cache memory, RAM, or persistent storage?
-
What is the amount of information that may be stored at a particular memory address?
-
Is the size of a data type always the same no matter which computer you may be working on?
-
What is the difference between an unsigned and a signed data type?
-
What is an ASCII value?
-
What is a literal string?
-
What is an expression?
-
What is the effect of declaring a variable?
-
Can you refer to a variable before declaring it as long as you declare it later?
-
What is the difference between the address and sizeof operators?
-
What is the difference between initialization and assignment?
-
What is overflow?
-
Do you use the cin object for compile-time or run-time assignment of values to variables ?
-
Which of the four arithmetic operations has more than one operator?
-
Which of the arithmetic operators cannot have a floating-point operand?
-
Which of the arithmetic operators cannot have a zero as a second operand?
-
Assuming total is an integer variable, how else could you express in code total = total + 5?
-
What is the result of 4 + 3 * 2?
-
What is the result of the expression 8 / 2 * 4?
-
What is the result of the expression 15 / 4?
-
What operator or function do you use to raise a number to a certain power?
-
What is an algorithm?
-
How many operands are in a relational expression?
-
What is the data type of the expression following the if keyword?
-
In an if / else if / else statement, which part must you have one, but only one, of?
-
In an if / else if / else statement, which part may you have more than one of?
-
In an if / else if / else statement, which part may you omit?
-
In a switch statement, what is the required data type of expression following the switch keyword?
-
In a switch statement, may the expression following a case keyword be a variable?
-
Which keyword in a switch statement corresponds to the else keyword in an if / else if / else statement?
-
Can you use nested if statements as an alternative to the logical And and Or operators?
-
For which of the logical operators do both Boolean expressions have to be true for the overall Boolean expression to be true?
-
For which of the logical operators do both Boolean expressions have to be false for the overall Boolean expression to be false?
-
Which of the logical operators reverses the truth of a Boolean expression, making a true expression false and a false expression true?
-
What does the increment operator do?
-
What does the decrement operator do?
-
In the statement cout << --num, which occurs first, decrementing num or the outputting of the value of num?
-
What is an iteration?
-
What is the usual purpose of the first expression in the parentheses following the for keyword?
-
What is the purpose of the second expression in the parentheses following the for keyword?
-
What is the usual purpose of the third expression in the parentheses following the for keyword?
-
Can one or more of the expressions in the parentheses following the for keyword be empty?
-
What is the purpose of the break keyword in a for loop?
-
What is the purpose of the continue keyword in a for loop?
-
If you were going to use nested for loops to print rows and columns, which for loop would print the columns inner or outer?
-
Which of the three loopsfor, while, or do whileexecutes at least once?
-
Which of the three loopsfor, while, or do whileis the best choice when the number of iterations is predictable?
-
Is the parenthetical expression following the while keyword for initialization, condition, or update?
-
What is a flag?
-
What is the difference between variable scope and lifetime?
-
Must a function other than main be prototyped?
-
Is a function required to have at least one argument?
-
May a function have more than one argument?
-
What is the effect on a variable in main if it is passed by value to another function that changes the argument corresponding to that variable?
-
What is the effect on a variable in main if it is passed by reference to another function that changes the argument corresponding to that variable?
-
Must a function have a return value?
-
May a function have more than one return value?
-
May a function have neither a return value nor any arguments?
-
May a function have both a return value and arguments?
-
Can a particular array contain integers, floats, and characters ?
-
What is the number of the starting index of an array?
-
What is the number of the ending index of an array?
-
What are the two alternative methods of initializing an array?
-
What is the purpose of the null character in a character array?
-
What is the value of the name of an array?
-
When you pass an array name as a function argument, are you passing it by value, reference, or address?
-
What is a pointer?
-
What is the difference between declaring an integer variable and declaring an integer pointer variable?
-
What is the meaning of the data type in the declaration of a pointer?
-
What is the meaning and purpose of NULL when being assigned to a pointer?
-
What operator do you use to assign a pointer the address of another variable or constant?
-
What is the purpose of the indirection operator?
-
What is the effect of incrementing a pointer variable?
-
What are the purposes of the new and delete operators?
-
Can you use an assignment operator to assign the value of one C-string to another?
-
What does it mean for data to be persistent?
-
What is a file?
-
What standard library should you include when your program reads from, or writes to, files?
-
Which of the three objects, fstream, ifstream , or ofstream , may be used both for file input and file output?
-
What are the two functions you can use to open a file?
-
What is the purpose of opening a file?
-
What is the purpose of closing a file?
-
What is a constructor?
-
Should file stream objects be passed as function arguments by value or by reference?
-
What type of relationship is involved in inheritance?
-
What type of relationship is involved in containership?
-
What is a structure?
-
What are the two ways to initialize a structure?
-
Can you nest one structure within another structure?
-
Why may a structure be passed by reference even if the function will not change the value of its member variables?
-
What is an important difference between a structure and a class?
Категории