Cs201 Glossary

Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

CS201 Glossary

1. #Include
The #include directive instructs the preprocessor to read and include
a file into a source code file. The file name is typically enclosed with
< and > if the file is a system provided file, or in quotes if the file is
user provided.

2. Abstract class
A class that can only be used as a base class for some other class. A
class is abstract if it has at least one pure virtual function.

3. Aggregate
An array or object of a class with no constructors, no private or
protected members, no base classes, and no virtual functions. Also see
initializer and initialization.

4. Alias
Defining an alias for a structure or built-in type allows use of the alias
as if it were a new type. In c, the keyword is typedef. It's a bad idea to
alias (have two objects pointing to the same data) unless one of those
objects is a temporary variable.

5. Allocation
The process of giving memory space to an object. Also see dynamic
storage, static storage, and deallocation

6. Argument
When calling a function, refers to the actual values passed to the
function. Also see parameter.
7. Array
An ordered and indexable sequence of values. C++ supports arrays of
a single dimension (a vector) or of multiple dimensions.

8. Assignment
The process of giving a value to a pre-existing object. Also see copy
constructor and initialization.

9. Base class
A class that serves as a base for a derived class to inherit members
from. Also see inheritance.

10. Bit
A bit is the smallest unit of memory that can be manipulated. It has a
binary or boolean value of 0 or 1. Within memory bits are combined to
form bytes and words. Depending on its type, a variable in a program
is stored in some number of bytes.

11. Bool
C++ keyword used to declare a boolean data type.

12. Break
C++ keyword used to specify a statement that is used to break out of a
for or while loop or out of a switch statement.

13. Byte
A byte is a grouping of eight bits which a computer typically groups
as one logical unit. It is usually the smallest addressable unit of
memory.
14. Call by reference
Passing a pointer to an argument to a function. The function can then
change the argument value. Also see call by value.

15. Call by value


a copy of an argument to a function. The function cannot then
change the argument value. C and c++ use call by value argument
passing. But also see pointer and reference, also see call by
reference.

16. Case
A c++ keyword used to denote an individual element of a switch
statement.

17. Char
A c++ keyword used to declare an object of character type. Often
considered the same as a byte, though it is possible to have multi-byte
characters.

18. Cin
In c++ stream i/o, the standard input stream.

19. Class
A c++ keyword used to declare the fundamental building block of
c++ programs. A class has a tag, members, access control
mechanisms, and so on.

20. Class layout


The way in which data class members are arranged in a class object.
21. Class member
A constituent member of a class, such as a data declaration, a
function, or a nested class.

22. Class template


A template used for generating class types.

23. Comments
C++ has c-style comments delimited with /* and */, and new c++-
style line-oriented comments starting with //.

24. Compiler
A software tool that converts a language such as c++ into a different
form, typically assembly language.

25. Const
A c++ keyword used to declare an object as constant or used to
declare a constant parameter.

26. Constructor
A function called when a class object comes into scope. The
constructor is used to initialize the object. See allocation, copy
constructor, and destructor.

27. Continue
C++ keyword used with for and while statements to continue the
iteration at the top of the loop.

28. Copy constructor


A special type of constructor that is called when an object is copied.

29. Cout
In c++ stream i/o, the standard output stream.
30. Data structure
The term data structure refers to the way data is organized for use
within a program. Correct organization of data can lead to simpler
and more efficient algorithms. Common data structures are linked-
lists, stacks, queues and trees.

31. Debugger
A tool for stepping through the execution of a program, examining
variables, setting breakpoints, and so on.

32. Declaration
A c++ entity that introduces one or more names into a program.
Declaration specifies to the compiler the types of all the elements
of an identifier; "this function or this piece of data exists somewhere
else, and here is what it should look like." see also definition for
definition.

33. Default argument


An optional argument to a function. A value specified in the
function declaration is used if the argument is not given.

34. Definition
Instantiates an identifier, allocating its memory. A declaration can
also be a definition. You can declare data or a function in many
difference places, but can define it only once.

35. Delete operator


C++ keyword and operator used to delete dynamic storage.

36. Derived class


A class that inherits members from a base class.

37. Destructor
A function called when a class object goes out of scope. It cleans up
the object, freeing resources like dynamic storage.

38. Do
A c/c++ reserved word that allows construction of an iterative loop.
The statements in the body always execute at least once. Also see
while.

39. Double
A fundamental data type in c and c++. Double variables are used to
store floating-point values. They offer greater precision and can
store larger numbers than floats.

40. Dynamic memory allocation


The process of dynamically creating objects in the heap or free
store during program runtime. Statically created objects, created
by the compiler, are put on the program stack.

41. Else
C++ keyword, part of the if statement, that allows conditional
execution of code.

42. Endl
The standard c++ library provides a set of manipulator functions
that can modify the state of iostream objects. Endl writes a new
line to output.

43. Explicit
A c++ keyword used in the declaration of constructors to
indicate that conversion of an initializer should not take place.
44. Expression
A combination of constants, variables, and operators used to
produce a value of some type.

45. Expression statement


A statement that is an expression, such as a function call or
assignment.

46. Float
A c++ keyword used to declare a floating point type.

47. For
A c++ keyword used to specify an iteration or looping statement.

48. Friend
A type of declaration used within a class to grant other classes
or functions access to that class.

49. Function
A c++ entity that is a sequence of statements. It has its own
scope, accepts a set of argument values, and returns a value on
completion.

50. Function overloading


The capability of having several routines in a program with the
same name. The different functions are distinguished by their
parameter types, return value types, or both; the compiler
automatically selects the correct version, based on parameter
types and return types.

51. Garbage collection


A way of automatically managing dynamic storage such that
explicit cleanup of storage is not required. C++ does not have
garbage collection.
52. Global variable
A variable that is accessible throughout the whole program, whose
lifetime is that of the program.

53. Goto
C++ keyword, used to transfer control within a c++ function.

54. Header file


A file containing class declarations, preprocessor directives, and so
on, and included in a translation unit. It is expanded by the
preprocessor.

55. Heap
A pool of memory used for dynamic memory allocation. Blocks
of memory from this area are allocated for program use during
execution using the new operator in c++ and the malloc function
in c.

56. If
C++ keyword used in conditional statements, that allows
conditional execution of code.

57. Inheritance
The process whereby a derived class inherits members from a
base class. A derived class will also add its own members to
those of the base class.

58. Inline
C++ keyword used to declare an inline function.
59. Inline function
A function that can be expanded by a compiler at the point of call,
thereby saving the overhead time required to call the function. Best
for recursive and loop calls. Provides type safety and side-effects
protection not afforded by #define.

60. Int
The c/c++ keyword int is used to declare an integer variable.

61. Interface
C++ separates its interface from its implementation. The
interface in c++ is the class definition of an object, and its
methods. The interface doesn't specify how the methods work;
this is done in the class implementation. Only the interface need
be compiled at compile time. The implementation can be linked
(or even written) at any time. You can compile a system to make
sure it all fits together without writing its implementation.

62. Keyword
A reserved identifier in c++, used to denote data types,
statements of the language, and so on. Keywords are reserved
words that serve a special purpose within a programming
language. They may declare the type or properties of an object,
or allow creation of program structure such as branches or loops.
They may not by used as identifiers or object (variable) names.

63. Label
A name that is the target of a goto statement.

64. Linker
A program that combines object files and library code to produce
an executable program.

65. Macro
A preprocessor feature that supports parameter substitution and
expansion of commonly-used code sequences. Also see inline
function.

66. Main
Every c or c++ program must have one and only one main
function. Program execution begins with the first statement in
main

67. Malloc
Malloc is used to dynamically allocate memory in the c
programming language. Malloc returns a pointer of type void to
a memory buffer of a requested size, or null if it fails. It may also
be used in c++, although new is preferred.

68. Manipulators
Special iostream functions permitting specific i/o operations
while in the middle of stream insertion or extraction. These
functions switch appropriate iostream format flags.

69. Memory leak


In c/c++, it is possible to allocate space for objects (variables)
dynamically during program execution. After finishing use of a
dynamically allocated object, it is necessary to explicitly release
the memory consumed by the object, particularly before pointers
to the object go out of scope. Failure to do so results in a memory
leak. Long running programs or those that allocate memory
extensively can consume or occupy enough of a computers
memory to seriously hinder performance when memory leaks
are present.

70. Name mangling


A way of encoding an external name representing a function so
as to be able to distinguish the types of its parameters.

71. New operator


C++ keyword and operator used to allocate dynamic storage.

72. Null pointer


A pointer value that evaluates to zero.

73. Object
In c++, often refers to an instance of a class. Also more loosely
refers to any named declaration of a variable or other entity that
involves storage.

74. Oop
Acronym for object-oriented programming.

75. Operator
A builtin operation of the c++ language, like ddition, or an
overloaded operator corresponding to a member function of a
class.

76. Operator overloading


To treat a c++ operator like << as a function and overload it for
particular parameter types. The assignment of more than one
function to a particular operator, with the implication that the
operation performed will vary depending on the data type
(operands) involved.

77. Overload
To specify more than one function of the same name, but with
varying numbers and types of parameters.

78. Parameter
Refers to the variables passed into a function.

79. Pointer
An address of an object.

80. Pointer to data member


A pointer that points at a data member of a class.

81. Pointer to function


An address of a function or a member function.

82. Preprocessing
A stage of compilation processing that occurs before the
compiler proper is invoked. Preprocessing handles macro
expansion among other things. In c++ use of const and inline
functions makes preprocessing less important.
83. Preprocessor
A device or routine that performs preliminary operations on
input before passing it on for further processing. See also
preprocessing.
84. Private
A c++ keyword used to specify that a class member can only be
accessed from member functions and friends of the class. See
access control, protected, and public.

85. Protected
A c++ keyword used to specify that a class member can only be
accessed by member functions and friends of its own class and
by member functions and friends of classes derived from this
class. See also private and public.

86. Prototype
A prototype is a function declaration. Function declarations are
generally placed in header files.

87. Public
A c++ keyword used to specify that class members are accessible
from any (non-member) function.

88. Queue
A queue is a data structure that supports fifo, first in first out
processing. Objects will be processed in the order they enter a
queue. Conceptualize a queue as a water pipe. The first water to
flow in will be the first water to flow out of the other end.

89. Reference
Another name for an object. Access to an object via a reference
is like manipulating the object itself. References are typically
implemented as pointers in the underlying generated code.

90. Register
C++ keyword used as a hint to the compiler that a particular local
variable should be placed in a machine register.
91. Reserved word
Keywords that serve a special purpose within a programming
language. They may declare the type or properties of an object,
or allow creation of program structure such as branches or loops.
They may not by used as identifiers or object (variable) names.

92. Return
C++ keyword used for returning values from a function.

93. Return value


The value returned from a function.

94. Scope
The region of a program where a name has visibility. Generally,
the domain of objects and calls within which an object can exist.
A struct name or enum in an inner scope can obscure a global of
the same name in an outer scope. In c++, enum constants
embedded in a struct def have the same scope as that struct's
fields.

95. Short
A c++ fundamental type used to declare small integers.

96. Signed
C++ keyword used to indicate a signed data type.

97. String
A set of consecutive characters treated by a computer as a single
item. In c, strings are represented in null , '\0', terminated
character arrays. In c++, it is common to use the string class,
which is part of the standard c++ library to hold and manipulate
strings.

98. Switch
C++ keyword denoting a statement type, used to dispatch to one
of several sequences of statements based on the value of an
expression.

99. Template
A parameterized type. A template can accept type parameters that
are used to customize the resulting type.

100. Template argument


An actual value or type given to a template to form a template class.

101. Template class


A combination of a template with a template argument list via
the process of template instantiation.

102. This
C++ keyword used in a member function to point at the object
currently being operated on.

103. Union
A structure somewhat like a class or struct, except that individual
union members share the same memory.

104. Virtual function


A member function whose interpretation when called depends
on the type of the object for which it is called; a function for an
object of a derived class will override a function of its base class.

105. While
C++ keyword used to declare an iteration statement. It means 'do
until the condition is true'.

You might also like