| < Day Day Up > |
|
What’s the purpose of the main() function? Why does every C++ program need one?
Describe how disassembling your programs and studying the results can improve your understanding of the C++ language and your computing platform.
What is the purpose of the preprocessor directive #include?
(True/False) You can use the C++ reserved keywords to name your own program objects.
The sizeof operator will return the size of data types in what unit of measure?
You can either memorize C++ operator precedence or use ________________ to force precedence and make source code easier to read at the same time.
Why can an unsigned data type represent a larger positive value than a signed data type?
When negative numbers are shifted to the right using the >> operator what is the effect on the sign bit?
How are string literals terminated?
Study the following code and answer the following questions:
1 #include <iostream> 2 using namespace std; 3 4 int val1 = 1; 5 6 int main(){ 7 { 8 cout<<val1++<<endl; 9 int val1 = ::val1; 10 cout<<val1<<endl; 11 } 12 cout<<val1<<endl; 13 return 0; 14 }
What value will the new variable named val1 be initialized to on line 9?
Which val1 will be printed to the screen on line 10?
What is the value of val1 printed to the screen on line 12?
Describe the effect of using the unary scope resolution operator :: on line 9. Why is its use necessary?
| < Day Day Up > |
|