CS220-Final-Sheets

# CS220-Final-Sheets - CS220 Introduction to Computer Science...

This preview shows pages 1–6. Sign up to view the full content.

CS220 Introduction to Computer Science Spring 2009, Dr. Sheldon Liang Final (170 points) Your Name: _______________ Your Score: ___________ Objectives: Programs = Data structures + Algorithms involve two essential aspects: data structures and functions that fulfill algorithms. Arrays and structures are two essential data structures. The array embodies the collection of homogeneous data elements, while the structure the collection of heterogeneous data members. So, the course after midterm can be categorized into following three: √ Arrays – homogeneous data collection [Ch 7] √ Partially-fill arrays and C-string [Ch 8] √ Structure – heterogeneous data collection [Ch 10] The final exam consists of three parts that cover: A. True / False [30 pts] B. Short Answer [30 pts] C. Multiple Choice [50 pts] D. Code Completion [60 pts] Make sure your name is on this handout before turning it in Since we stress “learning through lecturing, reading, and lab”, some questions have been designed for homework & quizzes stimulate students to listen, think, and read for the sake of deep learning. Also the labs have integrated important contents with questions, so through lab, the student can “taste” some core stuff that the student must master for the study

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

View Full Document
Final : Programs = Data Structures + Algorithms Trying your best in seeking answers will help you a lot. Leaving questions unanswered would earn you -1 point for each. 2 / 8
Final : Programs = Data Structures + Algorithms Q1. TRUE/FALSE (Check the box) [30 pts] [10 x 3] /* Circle the right answer from T and F, and explain when it is F */ 1. The indexed variables (members) of an array must be integers. - T -F 2. The following function declaration guarantees the values in the array argument are not changed. void function1(int array[], int numElements); - T -F 3. The following declares a c-string and initializes it to "speaker" char str[]="speaker"; - T -F 4. The following declares a c-string variable that will hold 10 letters. - T -F char str[10]; 5. Two different structure definitions may have the same member names.- T - F 6. A structure can only be passed to a function as a call-by-value parameter- T - F 7. A function may return a structure. - T - F 8. A class member function may be private. - T - F 9. A class member function may be public. - T - F 10. All constructors for a class must be private. - T - F 3 / 8

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

View Full Document
Final : Programs = Data Structures + Algorithms 4 / 8
Final : Programs = Data Structures + Algorithms Q2. Short Answers (30 pts) [10 x 3] /* When you feel like more than one answer, write them all, some wrongs won’t make you loss points. You are encouraged to do this way, which means multi-

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

### Page1 / 12

CS220-Final-Sheets - CS220 Introduction to Computer Science...

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

View Full Document
Ask a homework question - tutors are online