C++ Deck 4 Flashcards

1
Q

The meaning of this comparative operator: >

A

greater than

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

The meaning of this comparative operator: >=

A

greater than or equal to

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

The meaning of this comparative operator: !x

A

The NOT operator (negation) - returns true if x is false
(i.e. if the value is NOT x, then this statement will return TRUE)

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

The meaning of this comparative operator: x && y

A

The AND operator - true if BOTH x AND y are true

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

The meaning of this comparative operator: x II y

A

The OR operator - true if EITHER x OR y or BOTH are true.

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

True or False: The values in case labels must be constants.

A

True

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

True or False: The constants in a case label can be any data type.

A

False, they must be integer types.
(int, char, enumerations)

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

In the context of a switch statement, what does the break statement do?

A

It prevents other cases from being tested if the current one returns true.

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

What is the CPU?

A

Central Processing Unit

The “brain” of the computer.

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

What is the ISA?

A

Instruction Set Architecture

The specific set of low-level instructions available to a CPU.

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

What is the ALU?

A

Arithmetic & Logic Unit

Responsible for performing arithmetic calculations as well as logical operations (comparisons of equality and inequality, etc.)

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

What is the Main Memory (RAM)?

A

Random Access Memory

Storage close to CPU that is faster to access than the hard disk. It stores executing programs and data being currently worked on.

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

What is Secondary Memory?

A

SSD, Hard Disk, DVD, etc.

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

What are some examples of input devices?

A

Mouse, keyboard, scanner, network card, etc.

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

What are some examples of output devices?

A

Screen, console, printer, network card, etc.

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

What is a bit?

A

A binary digit which stores the value of 0 or 1. It is the smallest unit of storage in a computer.

17
Q

What is a byte?

A

8 bits. Smallest addressable unit of storage in a computer.
Storage units (variables) in a program are 1 or more bytes.
Each byte in memory has an address (a number that identifies the location)

18
Q

What is Machine Language?

A

The earliest programming languages in which instructions were written in binary representing low-level operations directly executed by the hardware. It was tedious and error-prone.

19
Q

What is Assembly Language?

A

A programming language which consisted of mnemonic codes and symbolic representations for machine instructions, making programming more readable and manageable. Assembly language programs were translated into machine code using assemblers.

20
Q

What are Procedural Languages?

A

Procedural languages (Fortran, COBOL) provided higher level abstraction which allowed instructions in a more human-readable form. They introduced control structures like loops and conditional statements.

21
Q

What is Structured Programming?

A

Languages (Pascal, C) that emphasized structured control flow such as loops, conditionals, and subroutines. Enhanced program clarity, maintainability, and modularity.

22
Q

What are object-oriented languages?

A

Languages (C++, Java) built on the concept of objects and classes. Promote encapsulation, inheritance, and polymorphism, enabling modular and reusable code. More natural representation of real-world concepts and complex systems.

23
Q

What are modern programming languages?

A

Languages (C++, Python, JavaScript, C#) which continue to evolve and offer various paradigms such as functional programming and scripting. They provide extensive libraries, frameworks, and tools for rapid development supporting diverse domains like web, data science, and AI.

24
Q

What are interpreted languages?

A

Source code run directly on an interpreter, a program that runs the code statements as they appear.

25
Q

What are Compiled Languages?

A

Languages that a compiler program translates the source code to machine language and links object code files together into an executable program. (C and C++ are compiled languages).

The code has to compile with no errors or the program won’t even run.