• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/38

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

38 Cards in this Set

  • Front
  • Back

preprocessor directive

#include





iostream



header file allowing output to display to the screen and input read from the keyboard.

using namespace std;

ensures access to the std namespace, containing entities in iostream.

int main()

a function; the MUST be in every C++ program called main

<<

stream insertion operator

endl

stream manipulator

\n
Newline Causes the cursor to go to the next line for subsequent printing.
\t
Horizontal tab Causes the cursor to skip over to the next tab stop.
\a
Alarm Causes the computer to beep.
short int
2 bytes -32,768 to +32,767



can be abbreviated as short

unsigned short int
2 bytes 0 to +65,535



can be abbreviated as unsigned short

int
4 bytes -2,147,483,648 to +2,147,483,647

unsigned int

4 bytes 0 to 4,294,967,295

can be abbreviated as unsigned

long int

8 bytes long
unsigned long int
8 bytes unsigned long

long long int

8 bytes



can be abbreviated as long long




equivalent to the hexadecimal value 7FFF,FFFF,FFFF,FFFF16, is the maximum value for a 64-bit signed integer in computing.

unsigned long long int
8 bytes 0 to 18,446,744,073,709,551,615



can be abbreviated as unsigned long long

char

used to store individual characters, -128 to 127 or 0 to 255




character literals are enclosed in single quotation marks

ASCII
American Standard Code for Information Interchange; most commonly used method for encoding characters

null terminator/character

the number 0, appended to the end of string literals

Characters normally occupy one _____ of memory

byte

Strings are _____________ sequences of characters that occupy _____________ bytes of memory

consecutive

Escape Sequences

Stored internally as one character (\n)



2.4791E2

247.91 in E notation

7.2E-4

0.00072 in E notation

Single precision

Key word (float) --- 4 bytes. Numbers between ±3.4E-38 and ±3.4E38

Double precision
key word (double) 8 bytes. Numbers between ±1.7E-308 and ±1.7E308
Long double precision
key word (long double) 8 bytes*. Numbers between ±1.7E-308 and ±1.7E308

truncated

what happens to any fractional part when dividing integers

sizeof
will report the number of bytes of memory used by anydata type or variable

lvalue = rvalue;

unitsSold = 12;

int flightNum = 89, travelTime, departure = 10, distance;
C++ allows you to define several variablesand only initialize some of them.

auto

tells the compiler to determine the variable’s data type from the initialization value.



auto interestRate = 12.0;


auto stockCode = 'D';


auto customerNum = 459L;

scope

the part of the program that has access to the variable
unary , binary , and ternary

how many operands are required for an operator.

number % 10

the rightmost digit

named constant

like a variable, but its content is read-only and cannot be changed while the program is running.


ex.


const double BIG_HOUSES = 1.404;

1

0