C+ Virtual Functions and
the notion of polymorphism.
how to define and use virtual functions to effect
the distinction between abstract classes and concrete
how to define pure virtual functions to create abst
C+ Classes and
software engineering concepts of encapsulation and
notions of data abstraction and abstract data types
creating C+ ADTs, namely classes.
creating, using, and destroying class objects.
C+ Enhancements to C
C+ enhancements to C.
C+ standard library.
Concept of inline functions.
To create and manipulate references.
Concept of default arguments.
Role the unary scope resolution operator has in
To be able to overload functio
C+ Operator Overloading
what operator overloading is and how it makes programs
more readable and programming more convenient.
how to redefine (overload) operators to work with objects of
differences between overloading unar
using function templates to conveniently create a group
of related (overloaded) functions.
function templates and function-template specializations.
using class templates to create a group of related types.
distinguishing between c
Characters and Strings
Fundamentals of Strings and Characters
Define as a character array or a variable of type char *
char color = "blue";
char *colorPtr = "blue";
Null character '\0' terminates strings
color has 5 elements
Programming in Large
In writing large-scale programs, there are important
issues to take into account; the code should be
reusable without having to be modified, recompiled,
easy to mainta
C Structures, Unions,
Structures in C
Collections of related variables (aggregates) under one name
Can contain variables of different data types
Commonly used to define records to be stored in files
Combined with point
Collection of data items of the same type
Static entity same size throughout program
Group of consecutive memory locations
Same name and type
To refer to an element, specify
Program Modules in C
Modules in C
Programs combine user-defined functions with library functions
C standard library has a wide variety of functions
Provide function name and arguments (data)
General Structure of a C
main function heading
2.2 A Simple C Program:
Printing a Line of Text
/* Fig. 2.1: fig02
Associate Professor of Computer Engineering
Office: Eng144, Phone: 338 1584, firstname.lastname@example.org
Office hours: Tue, Th 15:30-16:30 (or by appointment)
Slides adopted from the instructional mat