c_-_04 - Review of Part I Chapter 1 Chapter 8 Declaration...

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon
Review of Part I Chapter 1 – Chapter 8
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
What is the declaration of a function? What is the implementation of a function? Where should the declaration of a function be written? Where should the implementation of a function be written?
Background image of page 2
Constant How to define a constant in C++? How to define a constant pointer in C++? How to define a constant data pointed by a pointer? How to define a constant data pointed by a constant pointer?
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Namespace What is a namespace? What is the scope resolution operator? How to omit standard namespace prefix std:: in a program? How to access a global variable that has the same name as a local variable?
Background image of page 4
Parameters of Functions What are the differences of three ways of passing arguments to a function? How to declare the parameters that not to be changed in a function? How to pass a one-dimensional array to a function? How to pass a two-dimensional array to a function?
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Pointers void GetMemory(char *p, int num) { p = new char [num]; } void main() { char *str = NULL; GetMemory(str, 100); strcpy(str, "hello"); }
Background image of page 6
Pointers char *GetString(void) { char *p = "hello world"; return p; } void main() { char *str = NULL; str = GetString(); cout<< str << endl; }
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
if (i > k) if (i > j) if (i > l) cout << "B"; else cout << "C"; else cout << "D"; else cout << "E"; if (i > k) { if (i > j) { if (i > l) { cout << "B"; } else { cout << "C"; } } else { cout << "D"; } } else { cout << "E"; } You can use ALT + F8 to help you to arrange your indentation. But remember to add {} and space
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 32

c_-_04 - Review of Part I Chapter 1 Chapter 8 Declaration...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online