Final Flashcards

1
Q

When was the first calculation device created?

A

1642

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

How much space do you think the ENIAC computer occupies?

A

It occupied the 50-by-30-foot (15-by-9-metre) basement

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

What are the two main elements of a computer system?

A

Hardware and Software

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

What is the central processing unit(CPU)?

A

brain of the computer, the most expensive piece of hardware that carries out arithmetic and logical operations

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

Random Access Memory

A

connected to a cp, programs must be loaded into main memory before being executed, all programs must also be brought into main memory in order to be executed before it can be manipulated. Once the computer shuts off all memory is lost

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

T/F: Main memory is an ordered sequence of memory cells

A

true

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

What is secondary storage?

A

A device that stores information permanently

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

What are examples of secondary storage?

A

Hard disks, flash drives, CD-Roms

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

What is an input device and what are examples?

A

feeds data and programs into computers. for example, keyboard, mouse, scanner, camera

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

What is an output device and what are examples?

A

displays the results, examples would be monitor, printer, or secondary storage

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

If you are asked to buy a computer to analyze and process a large amount of data
(12+ GB), which computer will you select based on the given specification?

A

hard drive: 560 GB
RAM: 64 GB
processor: Intel Xeon

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

What is an operating system?

A

monitors the overall activity of a computer

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

What are the following steps to process a C++ program?

A

problem understanding, analysis,

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

What is an algorithm?

A

step-by-step problem-solving process

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

What is a structured design?

A

involves dividing a problem into smaller subproblems

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

Object-oriented design

A

identifying components called objects, and also determines how objects interact with each other

18
Q

Is there any difference between computer program and programming?

A

computer program is a sequence of statements whose objective is to accomplish a task, computer programming is the process of planning and creating a program

19
Q

what is a subprogram or function?

A

a collection of statements

20
Q

syntax rules

A

rules that specify which statements are legal or valid

21
Q

semantic rules

A

determine the meaning of the instructions

22
Q

programming language

A

set of rules, symbols, and special words

23
Q

what is a data type?

A

set of values together with a set of allowed operations

24
Q

The expression static_cast<double>(8 + 15) evaluate to</double>

25
what is a stream?
sequence of characters from the source to the destination
26
Input stream
sequence of characters from an input device to the computer
27
Output stream
sequence of characters from the computer to an output device
28
You need to include the library ______ to receive characters from the keyboard
iostream
29
Which symbol represents the extraction operation in C++?
>>
30
Suppose you have the following variable declaration: int a; double x; char y; Select the correct value storage in memory: Statement Input cin >> a 3.45 cin>> y '48
3,4
31
Does the following lines of code the same task ? int y; 1. cin >> y; 2. cin.get(y);
No, the two lines of code you provided do not perform the same task. Let's break down each line: cin >> y;: This line reads input from the standard input (usually the keyboard) and stores it in the variable y. The >> operator is used for input extraction. cin.get(y);: This line uses the get member function of the cin object to read a single character from the standard input and stores its ASCII value in the variable y. It doesn't read an integer value directly; instead, it reads a character.
32
The following line of code will print: int a, b; cin >> a; cin.ignore(100,'\n') cin >> b; cout << a <<", "<
2,3
33
In C++ the setprecision(n) manipulator is use to _____
define the number of digits to be printed
34
Suppose the input value is 34.76345. What are the output of the following two line of code? cout<
34.7634 34.76
35
To use the manipulators; setw, left, right. You need to inlcude the library
iomanip
36