Computer Laboratory – Course pages 2011–12: Programming in C and C++ Skip to content | Access key help Search Advanced search A–Z Contact us Computer Laboratory Computer Laboratory Teaching Courses 2011–12 Programming in C and C++ Algorithms II Computer Design Concurrent and Distributed Systems ECAD and Architecture Practical Classes Further Java Logic and Proof Mathematical Methods for Computer Science Programming in C and C++ Prolog Semantics of Programming Languages Software Engineering Unix Tools Compiler Construction Complexity Theory Computation Theory Computer Graphics and Image Processing Computer Networking Databases Artificial Intelligence I Concepts in Programming Languages Economics and Law Security I Course pages 2011–12 Programming in C and C++ Syllabus Course materials Information for supervisors Principal lecturer: Dr Stephen Clark Taken by: Part IB Past exam questions Information for supervisors (contact lecturer for access permission) No. of lectures: 8 Prerequisite courses: None, though Operating Systems would be helpful. Aims The aims of this course are to provide a solid introduction to programming in C and C++ and to provide an overview of the principles and constraints that affect the way in which the C and C++ programming languages have been designed and are used. Lectures Introduction to the C language. Background and goals of C. Types and variables. Expressions and statements. Functions. Multiple compilation units. [1 lecture] Further C concepts. Preprocessor. Pointers and pointer arithmetic. Data structures. Dynamic memory management. Examples. [2 lectures] Introduction to C++. Goals of C++. Differences between C and C++. References versus pointers. Overloading functions. [1 lecture] Objects in C++. Classes and structs. Operator overloading. Virtual functions. Multiple inheritance. Virtual base classes. Examples. [2 lectures] Further C++ concepts. Exceptions. Templates and meta-programming. Java Native Interface (JNI). Examples. [2 lectures] Objectives At the end of the course students should be able to read and write C and C++ programs; understand the interaction between C and C++ programs and the host operating system; be familiar with the structure of C and C++ program execution in machine memory; understand the object-oriented paradigm presented by C++; be able to make effective use of templates and meta-programming techniques as used in the STL; understand the potential dangers of writing programs in C and C++. Recommended reading * Eckel, B. (2000). Thinking in C++, Vol. 1: Introduction to Standard C++. Prentice Hall (2nd ed.). Also available at http://www.mindview.net/Books/TICPP/ThinkingInCPP2e.html Kernighan, B.W. & Ritchie, D.M. (1988). The C programming language. Prentice Hall (2nd ed.). Stroustrup, B. (2008). Programming -- principles and practice using C++. Addison-Wesley. Stroustrup, B. (1994). The design and evolution of C++. Addison-Wesley. Lippman, S.B. (1996). Inside the C++ object model. Addison-Wesley. © 2011 Computer Laboratory, University of Cambridge Information provided by Dr Stephen Clark