Object-Oriented Programming in C++
Final Exam Revision Guide
(Figure numbers referred here are from the PowerPoint handouts on the web)
At minimum you should pay attention to following while studying:
Functions- call by value, call by reference
Chapter 6: Recursion
Chapter 7: Reading and writing to text files
Chapter 8 – One and two dimensional arrays – e.g
• Fig 8-7 Difference in a,b, and c scenarios,
• Fig 8.10 , Fig 8-11,
• Fig 8.12
• Fig 8.30, 8.31, 8.32
Chapter 9 – Pointer concepts
• Fig 9-3
• Fig 9-7
• Fig 9 – 10
• Difference between 9-16 and 9 – 7
• Fig 9 – 18, 9 – 19, 9 –21
Chapter 10 – Pointer and array concepts, dynamic memory allocation for arrays
• Fig 10 –1
• Fig 10 – 2
• Fig 10 – 3
• Fig 10 – 4
• Fig 10 – 7
• Fig 10 – 9
• Fig 10 – 14
• Fig 10 – 16, Fig 10 – 17, Fig 10 – 20
Chapter 11
• Difference between String and character arrays, strings in arrays e.g. page 522, slide, page 524
• Strings and pointer e.g. figure 11-10
• String input/output - %s format, Program 11-4
• Arrays of strin e.g. program 11-9
• Strcat, Strcmp, Strcpy, strlen
Chapter 12
• Enumerated Types e.g page 590, 591
• Structure – Accessing Structures – page 599,602
• Structure and Pointers – page 604, Program 12-3
• Passing structures to functions – page 604, Program 12-5
• Union concept e.g Program 12-7
Other:
General Information on Linked List,
Searching algorithm – Sequential search, Binary Search
Sorting
PART I. Answer “True” or “False”
1. Character arrays cannot be initialized with character constants in an initializer list.
2. C allows two pointers to be added.
3. All global variables must be defined outside a function.
4. .Call by reference can increase security of the data.
5. The function strcpy can be used to compare strings.
.
II. Mark the correct answer.
1. Which of the following statements will determine if the contents of string1 are the same as contents of string2? Assume that string1 and string2 are properly defined and formatted strings.
A if(string1 == string2)
B if(strcmp(string1, string2))
C if(strcmp(string1, string2) = = 0)
D if(strcmp(string1, string2) name
C ptr.student.name
D ptr->student.name
PART III Show the output of the following programs as printed out by the computer. (36 points)
1) #include
int main (void)
{
int *x,*y,*z, i;
int a[10]={9,8,7,3,4,5,6,7,8,9};
x= y = z =a;
for (i=0;i ................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related searches
- object oriented programming in matlab
- matlab object oriented programming pdf
- object oriented programming tutorial pdf
- object oriented programming book pdf
- object oriented programming c pdf
- object oriented programming 2 pdf
- object oriented programming pdf download
- object oriented programming c book
- object oriented programming java examples
- object oriented programming language pdf
- object oriented programming python pdf
- c object oriented programming examples