Zybook Glossary C++

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

math library

Thus, the language comes with a standard math library that has about 20 math operations available for floating-point values, listed later in this section.

processors

To support different calculations, circuits called processors were created to process (aka execute) a list of desired calculations.

integrated circuit

Transistors that are put onto one chip

underscore

"_" is considered to be a letter

braces

"{" and "}" are called braces, denoting a list of statements. { } are braces.

RAM

(random-access memory) temporarily holds data read from storage, and is designed such that any address can be accessed much faster than disk, in just a few clock ticks (see below) rather than hundreds of ticks.

Arithmetic operators

+,-,*,/,%

unary minus

- used as negative is known as unary minus.

bits

0s and 1s are known as bits (binary digits).

operating system

The operating system allows a user to run other programs and which interfaces with the many other peripherals.

processor

The processor runs the computer's programs, reading and executing instructions from memory, performing operations, and reading/writing data from/to memory.

main

The program starts by executing a function called main.

app

The programmer-created sequence of instructions

application

The programmer-created sequence of instructions

program

The programmer-created sequence of instructions

memory

A memory is composed of numerous individual locations, each able to store a value.

block comment

A multi-line comment is also known as a block comment.

multi-line comment

A multi-line comment uses the /* and */ symbols.

identifier

A name created by a programmer for an item like a variable or function is called an identifier.

newline character

A new line can also be output by inserting \n, known as a newline character, within a string literal.

cache

A processor may contain a small amount of RAM on its own chip, called cache memory, accessible in one clock tick rather than several, for maintaining a copy of the most-used instructions or data.

Clock

A processor's instructions execute at a rate governed by the processor's clock, which ticks at a specific frequency.

reserved word

A reserved word is a word that is part of the language, like int, short, or double.

screen

A screen (or monitor) displays items to a user.

string

A sequence of characters is called a string. programmer can use an array to store a sequence of characters, known as a string.

executable program

A sequence of machine instructions together form an executable program.

single-line comment

A single-line comment uses the // symbols.

statement

A statement is a program instruction.

naming conventions

A type of identifier

double

A variable declared as type double stores a floating-point number.

char

A variable of char type can store a single character, like the letter m or the symbol %.

variable

A variable represents a memory location used to store data.

whitespace character

A whitespace character is a character used to print spaces in text, and includes spaces, tabs, and newline characters.

ASCII

ASCII is an early standard for encoding characters as numbers.

assignment statement

An assignment statement like numApples = 8; stores (i.e. assigns) the right-side item's current value (in this case, 8) into the variable on left side (numApples).

escape sequence

An escape sequence is a two-character sequence starting with \ that represents a special character.

expression

An expression may be a number like 80, a variable name like numApples, or a simple calculation like numApples + 1. An expression is a combination of items, like variables, literals, and operators, that evaluates to a value.

const or constant variable

An initialized variable whose value cannot change is called a constant variable.

argument

An input value to a function appears between parentheses and is known as an argument.The value passed to a parameter is known as an argument.

operator

An operator is a symbol for a built-in language calculation like + for addition.

compile-time error

Because a syntax error is detected by the compiler, a syntax error is known as a type of compile-time error.

abs()

Compute absolute value

endl

Cout << endl starts a new output line.

style guide

Each programming team, whether a company or a classroom, may have its own style for writing code, sometimes called a style guide.

semicolon

Ends a line of code.

transistors

Engineers created smaller switches called transistors, which in 1958 were integrated onto a single chip.

machine instructions

Instructions represented as 0s and 1s are known as machine instructions.

function call

Invoking a function is a function call. Invoking a function's name, known as a function call, causes the function's statements to execute.

K&R style

K&R style for braces and indents is named after C language creators Kernighan and Ritchie.

Lower camel case

Lower camel case abuts multiple words, capitalizing each word except the first, as in numApples or peopleOnBus.

problem solving

Much of programming is about problem solving: Creating a methodical solution to a given task.

syntax error

One kind of mistake, known as a syntax error, is to violate a programming language's rules on how symbols can be combined to create a program.

pow

Raise to power

cin

Reading input is achieved using the statement: cin >> variableName. Cin is a predefined istream pre-associated with a system's standard input, usually a computer keyboard.

compound operators

Special operators called compound operators provide a shorthand way to update a variable, such as userAge += 1 being shorthand for userAge = userAge + 1.

Stroustrup style

Stroustrup style for braces and indents is named after C++ language creator Bjarne Stroustrup.

string literal

Text in double quotes " " is known as a string literal.

precedence rules

The compiler evaluates an expression's arithmetic operators using the order of standard mathematics, such order known in programming as precedence rules.

cout

The cout construct supports printing. predefined ostream object (e.g., you can think of it as declared as ostream cout; in the iostream library) that is pre-associated with a system's standard output, usually a computer screen.

Moore's Law

The doubling of IC capacity roughly every 18 months, which continues today.

getline

The function getline(cin, stringVar) reads all user text on the input line, up to the newline character resulting from the user pressing ENTER, into stringVar.

assembly

high-level languages; compilers; To support high-level languages, programmers created compilers, which are programs that automatically translate high-level language programs into executable programs.

keyword

is a word that is part of the language, like int, short, or double

Code

is the textual representation of a program. The region where the program instructions are stored

instruction

memory; A memory is a circuit that can store 0s and 1s in each of a series of thousands of addressed locations.

%

modulo (remainder)

sqrt

square root

-

subtraction

tan

tangent

byte

A byte is 8 bits.

character literal

A character literal is surrounded with single quotes, as in 'm' or '%'.

comment

A comment is text added to code by a programmer, intended to be read by humans to better understand the code, but ignored by the compiler.

compiler

A compiler is a tool that converts a program into low-level machine instructions (0s and 1s) understood by a particular computer.

warning

A compiler will sometimes report a warning, which doesn't stop the compiler from creating an executable program, but indicates a possible logic error.

computer program

A computer program consists of instructions that a computer executes (or runs), like multiplying numbers or printing a number to a screen.

disk

A disk (aka hard drive) stores files and other data, such as program files, song/movie files, or office documents.

divide-by-zero error

A divide-by-zero error occurs at runtime if a divisor is 0, causing a program to terminate.

floating-point divide-by-zero

A floating-point divide-by-zero occurs at runtime if a divisor is 0.0. Dividing by zero results in infinity or -infinity depending on the signs of the operands.

floating-point literal

A floating-point literal is a number with a fractional part, even if that fraction is 0, as in 1.0, 0.0, or 99.573.

scientific notation

A floating-point literal using scientific notation is written using an e preceding the power-of-10 exponent, as in 6.02e23 to represent 6.02x1023.

function

A function is a list of statements that can be executed by referring to the function's name. A function is a named list of statements.

keyboard

A keyboard allows a user to provide input to the computer.

line

A line is a row of text.

literal

A literal is a specific value in code like 2.

bug

A logic error is an error that occurs while a program runs, also called a runtime error or bug.

logic error

A logic error is an error that occurs while a program runs, also called a runtime error or bug.

runtime error

A logic error is an error that occurs while a program runs, also called a runtime error or bug.

Memory

A memory is a circuit that can store 0s and 1s in each of a series of thousands of addressed locations.

case sensitive

Identifiers are case sensitive, meaning upper and lower case letters differ.

C

In 1978, Brian Kernighan and Dennis Ritchie at AT&T Bell Labs (which used computers extensively for automatic phone call routing) published a book describing a new high-level language with the simple name C.

C++

In 1985, Bjarne Stroustrup published a book describing a C-based language called C++, adding constructs to support a style of programming known as object-oriented programming, along with other improvements.

address

Where the variable address is located

Whitespace

Whitespace refers to blank spaces between items within a statement, and to blank lines between statements.

+

addition

cos

cosine

declares

declaration of a new variable

/

division

exp

exponent

*

multiplication

sin

sine


Kaugnay na mga set ng pag-aaral

Psychology (Stress and Heart Disease)

View Set

Another set bc im stupid 🙋🏻‍♂️

View Set

ОИТ. 25. Проблематика ИИ.

View Set

APICS CPIM BSCM Session 4 Master Planning

View Set

Diabetes and Nutrition Nursing 1 Lone Star North Harris

View Set

Chapter 12: Hardware and Network Troubleshooting

View Set

Anatomy & Physiology Chapter 1 & 2 Review

View Set