1/128
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Program
a collection of text that commands a computer to perform algorithms.
Programming Language
collection of rules and syntax use to describe a program. It is employed based on the user's objective and the computers format and usage.
Programming
An act of writing algorithms while utilizing a programming language.
Low-level Language
programming languages writteni n a format that is easy for computers to interpret
High-Level Language
programming languages written in a format that resembles human language and diminishes user awareness of hardware devices
- Machine Language
- Assembly Language
Example of Low-level language
- C++
- Java
- FORTRAN
- COBOL
- Phython
- ABAP
examples of high-level language
C++ Language
a general purpose programming language with a bias towards systems programming that
- C++ is the better c
- C++ supports data abstraction
- C++ supports generic and object oriented programming
- C++ is case sensitive
C++ is?
Pre-processor Directive
#include
Pre-processor Directive
instructs the compiler to locatethe file that contains code forthe
using namespace std;
allows you to use cout and endl without the prefix std::
int main ()
Entry point for the application when program execution starts.
cout << "Welcome" << endl;
Body of the program
Body of the program
where the content is located or written
return 0;
Used to end a function or method when a value is expected to be sent back to acaller
Source Code/Source Program
A program written in a high-level language, created in the text editor.
Note: the program must be saved in the text file that has theextension .cpp
Pre-processor Directive
statements that begin with the symbol # processed by preprocessor program.
iostream
contains the descriptions of the functions needed to perform input/output (I/O)
cmath
contains the descriptions of some very useful mathematical functions, such aspower, absolute, and sine
iomanip
contains the specifications of many useful functions and manipulators that help you format your output in a specific manner
Compiler
Checks the source program for syntax errors and translates the entiresource programs into the equivalent machine language with anexecutable format.
- A complete set of machine language is executed after translation, resulting in a program that runs faster than a program translated by an interpreter.
Interpreter
executed program while translating one command at a time from source program into machine language. The translation and execution processes repeat for each command,resulting in a program that runs slower than a program translated by a compiler
Object Program
the machine language version of the high-level programming language
Linker
A program that combines the object program with other programs in the library, and is used in the program to create the executable code.
Loader
Loads the executable program into main memory for execution
Execution
Process by which a computer or virtual machine executes the instructions of a computer program
Value
representation of an entity that can bemanipulated by a program and is classified based ondifferent data types
Variable
a one-word name that points to a value.
Data Type
determines the type of data that a variablecan hold.
Primitive Data Type
Data types that are built-in or predefined and can be used directly bythe developer to declare variables.
integer
Data type that deals with integers or numbers without decimal part
int
keyword for integer
Floating point
Single precision data type that deals with decimal numbers
float
keyword for floating point
7
max number of decimal places for floating point
Double Floating Point
Double precision data type that deals with decimal numbers.
double
keyword for double floating point
15
max number of decimals for floating point
Boolean
Data type used to store Boolean or logical values.
bool
keyword for boolean
True or False
example of boolean
Character
Data type used to represent characters (letters, digits,special symbols).
char
keyword for character
Wide character
A character data type but has size greater than the normal 8-bit datatype
wchar_t
keyword for wide character
2
char storage in bytes
1
bool storage in bytes
4
int storage in bytes
2
short storage in bytes
4
long storage in bytes
String
a sequence of zero or more characters and isenclosed in a double quotation marks.
13
what is the length of the string for William Jacob
6
what is the length of the string for mickey
ctrings
one-dimensional arrays of characters terminated bya null character '\0'
strcat
concatenates string s2 onto the end of string s1
strncat
concatenates string s2 onto the end of string s1 up to n characters
strcmp
compares the two strings lexicographically and returns the following values:0 if s1 and s2 are the same;
less than 0 if s1< s2;
greater than 0 if s1>s2.
strcpy
copies string s2 into string s1
strncpy
copies string s2 into string s1 up to n characters
strlen
returns the length of a string
Derived Data Type
Data types that are derived from primitive data types.
Function
Block of code or program-segment that isdefined to perform a specific well-defined task.
Array
Collection of items stored at continuous memory locations.
Pointers
Symbolic representation of addresses that enable programs to simulate call-by-referenceas well as to create and manipulate dynamic data structures.
Reference
Alternative name for an existing variable.
Abstract Data Type
Also known as user-defined data types, these are data types defined bythe developer, himself.
Examples: class, structure, union and enumeration
Operators
symbols that denote calculation, relationship, comparison and operations on operands.
Constant
memory location whose content is not allowed to change during program execution.
Token
smallest individual unit of a program written in any language
Special Symbols
Consists of operators in a form of mathematical symbols, punctuation marks or two characters regarded as a single symbol.
Arithmetic Operators
Operators used to perform mathematical operationslike addition, subtraction, multiplication and division.
x + y
Addition
x - y
Subtraction
x * y
Multiplication
x / y
Division
x % y
Modulus
x ++
Increment Increase
x --
Increment Decrease
++ X
Pre increment
-- x
pre decrement
x ++
post increment
x --
post decrement
>
Greater than
<
less than
==
equal than
!=
not equal to
>=
greater than or equal to
<=
lesser than or equal to
Logical operators
Operators used to perform logical AND, OR and NOT operations.
&&
logical and
||
logical or
!
logical not
Assignment Operators
Operators used to assign values to the variables.
x = y + z
assign value of the right side of expression to left side operand
x+=y
x=x+y
add and
x-=y
x=x-y
subtract and
x*=y
x=x*y
multiply and
x/=y
x = x/y
divide and
x%=y
x=x%y
modulus and