Save
ENG209 - Prelim
Lesson 3
Save
Share
Learn
Content
Leaderboard
Learn
Created by
Christine
Visit profile
Cards (33)
A
C++
program is a collection of
text
that
commands
a
computer
to
perform algorithms
View source
Programming Language
: Set of rules and
syntax
used to
describe
a
program
View source
Low-Level Language
: Easily interpretable by computers (e.g.,
machine language
,
assembly language
)
View source
High-Level Language
: Resembles
human language
, reduces
user awareness
of
hardware
(e.g.,
C++
,
Java
)
View source
C++ Language
:
General-purpose programming language
with a
bias towards systems programming
View source
C++ supports
data abstraction
, is a better
C
, and supports
generic
and
object-oriented
programming
View source
C++
is case sensitive
View source
Pre-processor Directive
locates the file with code for the
<iostream>
library
View source
Main Function
is the entry point for program execution
View source
Curly Braces define
the
body
of the program
View source
Closing Curly Brace
ends a function or method when a value is expected to be returned
View source
Source Code
is written in a high-level language, saved with a
.cpp
extension
View source
Preprocessor Directives
are statements processed by the preprocessor
View source
Common header files include
<iostream>
,
<cmath>
,
<iomanip>
View source
Compiler checks for
syntax errors
, translates the
source program into machine language
View source
Linker
combines
object program
with other
programs
in the
library
View source
Primitive Data Types
are built-in or predefined (e.g., int, float, double, bool, char)
View source
String
is a sequence of characters enclosed in
double quotation marks
View source
C Strings
are
one-dimensional arrays
of
characters
, terminated by a
null character
'
\0'
View source
String Functions
:
strcat
: Concatenates
two
strings
strncat
: Concatenates
up
to n characters of
one
string onto another
strcmp
: Compares two strings
lexicographically
strcpy
: Copies
one
string into another
strncpy
: Copies up to
n
characters of one string into another
strlen
: Returns the
length
of a
string
View source
Function
is a block of
code
defined to perform a
specific
task
View source
Array
is a collection of items stored at
continuous
memory locations
View source
Pointers
are symbolic representations of
addresses
, enabling
call-by-reference
and
dynamic data manipulation
View source
Abstract Data Types
are user-defined data types (e.g., class, structure, union, enumeration)
View source
Operators
are symbols denoting calculation, relationship, comparison, and operations on
operands
View source
Constant
is a
memory location
with
unchangeable content
during
program execution
View source
Identifiers
consist of letters, digits, and underscores, must start with a
letter
or
underscore
View source
C++
Statements include declaration statements used to declare variables and executable statements that perform calculations, manipulate data, create output, accept input, etc
View source
Output Stream
is the flow of bytes from
main memory
to display, while
Input Stream
is the flow of bytes from the
keyboard
to
main memory
View source
Escape Sequences
are special characters modifying output format
View source
Expression
is a combination of values, variables, and operators
View source
Casting
is explicit type conversion using
static
_
cast
View source
Visualize the problem using a
flowchart
, translate into
pseudocodes
, and write equivalent
C++
codes for each pseudocode
View source