Chapter 2 Programming Basics Flashcards

1
Q

What are comments?

A

Text in a coding file not read in the compiler.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are directives?

A

Instructions given to the compiler to perform a specific task (e.g. libraries).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Keywords/Reserved Words

A

Words that have been predefined by C++ and can not be given a new meaning.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are identifiers?

A

These are words that are programmed that have their own meanings.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are literals?

A

Literals are values coded into the language that only have one possible value.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Operators

A

Symbols used to indicate an operation being performed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are libraries and their two parts?

A

Libraries are files with created functions. The interface is the header file before the main function and the implementation are the different functions utilized within the main function.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is preprocessing for?

A

To link all the header files to make a valid program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What happens in the compiling stage?

A

The code is translated into machine language line by line checking errors.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is linking?

A

Putting the preprocessing materials and the compiled code together.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are atomic and composite data types?

A

Atomic data types hold one piece of information that can not be split. Composite data types are comprised of several pieces of atomic data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is a Boolean type?

A

The bool type can hold either true or false, taking one byte.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the char data type?

A

Holds one character using one byte. Signed: -128-+127 Unsigned: 0-255

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is a short data type?

A

Can store small integers using 2 bytes.
Signed: -32768-+32767 Unsigned: 0-65535

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the int data type?

A

The integer data type uses for 4 bytes and is the standard data type. Signed: -32768-+32767 Unsigned: 0 - 65535

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the long data type?

A

The long data type is also an integer type that uses 8 bytes for large values. Signed: -2^63 -+2^63-1(8 quintillion) Unsigned 0-264-1 (16 quintillion)

17
Q

What is the float data type?

A

This uses 4 bytes and can hold fractional data stored in the IEEE754 single precision floating point standard. Signed or Unsigned: -3.410^-38 - +3.410^38

18
Q

What is the double data type?

A

This is 8 bytes and can hold fractional data stored in the double precision IEEE754 floating-point standard. Signed or Unsigned: -1.710^-308 - +1.710^308

19
Q

What is the long double data type?

A

This is a floating point data type that is 16 bytes and has quadruple precision floating-point numbers. Same range as doubles with more decimal places.

20
Q

What is a symbolic constant?

A

Symbolic constants are created with a preprocessor directive. #define PI 3.14

21
Q

Define octal and hexadecimal integers.

A

Leading 0 and leading 0x.