0% found this document useful (0 votes)
5 views

C++ - Keywords

The document provides a comprehensive overview of C programming keywords and concepts, categorized into three parts. It covers operators, data structures, classes, constructors, inheritance, and exception handling, among other topics. Each section defines key terms and their functionalities within the C programming language.

Uploaded by

dselionmath
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

C++ - Keywords

The document provides a comprehensive overview of C programming keywords and concepts, categorized into three parts. It covers operators, data structures, classes, constructors, inheritance, and exception handling, among other topics. Each section defines key terms and their functionalities within the C programming language.

Uploaded by

dselionmath
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

https://blog.henrypoon.

com/blog/2010/01/18/description-of-c-keywords/

Key words:

Part I:

% = modulo (remainder)

Compound assignment operator (eg, y+=x means y = y+x)

== equal to

!= not equal to

! && || means not, and or

Sizeof (return in bytes)

<sstream> means string stream (allows strings to be manipulated)

Break loop, continue loop

Void = functions with no type (eg, no value)

Pass by reference

Const (parameters or types cannot be modified)

Default function value (eg ch7_4)

Declaring function prototype (declare functions before their definition, eg, ch7_5)

Recursive function

Overloading functions (different functions, eg, types, parameters, etc with same name)

Function template (to allow function overloading)

Non-type template arguments

Global local variables

Inner block scope (local variables in a block)

Namespace (allows different functions with same name)

Using (= using which namespace function)


Static vs automatic storage (global vs local)

Multi-dimensional array = pseudo-multi-dimensional array

Array as parameters

Part II:

Null terminated character sequence (NTCS) = string

Pointer (to address & vs value *)

Nothrow (to terminate program or not)

Data structure (group of data or arrays under 1 name)

a->b (member b of object pointed to by a)

class = data structure where member data can also be objects such as functions

class constructor = a class can include a special function called its constructor, which is automatically
called whenever a new object of this class is created, allowing the class to initialize member variables or
allocate storage.

Overloading constructors = constructor functions (same name) with different parameters

Default constructor = constructor with no parameter

Functional form = constructors with arguments in brackets

Uniform initialization = functional form with > 1 argument

POD = plain old data (class without constructor)

Member initialization = give class with a constructor a parameter value

Class = new type, can interact with operators (overloadable)

This = pointer to the object whose member function is being executed

Static members = same value for all objects in the same class

Const member functions = access to objects outside the class are read-only

Class template = function template (members in template use the same template parameters/types)

Template specialization = template with specified type


Special members = member functions implicitly defined in a class

Destructor = opposite of constructor (cleanup a class after use to release memory)

Copy constructor = duplicate a constructor with same type (shallow copy = copy + original share same
value; deep copy = copy + original share same distinct values)

Move constructor = copy constructor but content in original is removed

Friend function = non-member function that accesses members of private and protected class

Inheritance = derived class formed from a base class + additional members

Multiple inheritance = derived class from > 1 base class

Polymorphism = a pointer to base class can be the same type as a pointer to the derived class

Virtual member = member function that can be redefined in a derived class

Abstract base class = base class with virtual members that have no definition (pure virtual functions)

Part III:

Type-cast = implicit conversion to a particular type

Explicit conversion = allow > 1 implicit conversion

Dynamic cast = allows type conversion to point to an object with same type

Const cast = pointer to object with const (to remove const or set const)

Typeid = check type of an expression

Exception = handle exceptional circumstances (eg program termination)

Standard exception = system-defined exceptions

Preprocessor = check the code before compilation (eg, function macros)

Standard macro names = system reserved function macros

Concatenate = glue together

Header file = subroutine

You might also like