[ fromfile: cppintro-questions.xml id: cppintro-questions ]
What is a stream? What kinds of streams are there?
Give one reason to use an ostrstream
.
What is the main difference between getline
and the >> operator?
What is the type of each expression in the following list?
3.14
'D'
"d"
6
6.2f
"something stringy"
false
In Example 1.31, identify the type and value of each numbered item:
Example 1.31. src/types/types.cpp
#include <QTextStream> int main() { QTextStream cout(stdout); int i = 5; int j=6; int* p = &i; int& r=i; int& rpr=(*p); i = 10; p = &j; rpr = 7; r = 8; cout << "i=" << i << " j=" << j << endl; return 0; }
What is the difference between a pointer and a reference?
What is the keyword "const" used for? Why and how would you use it in a program?
What is the "address-of" operator? Why and how would you use it in a program?
What is the "dereference" operator? Why and how would you use it in a program?
What is a null pointer? Why would you define one in a program?
What is a memory leak? What would cause one in a program?
What might cause a segmentation fault (or, in Windows, a general protection fault)?
What are the possible uses of const when dealing with pointers?
What is a function's signature?
What is meant by the term, "function overloading" ?
Why is it an error to have two functions with the same signature but different return types in one scope?
Why does main(int argc, char* argv[])
sometimes have parameters? What are
they used for?
Generated: 2012-03-02 | © 2012 Alan Ezust and Paul Ezust. |