Programming Fundamentals: Exam One Study Guide

studied byStudied by 171 people
5.0(3)
Get a hint
Hint
<p>From a High-Level Program to an Executable File: Fill in the chart:</p>

From a High-Level Program to an Executable File: Fill in the chart:

1 / 66

encourage image

There's no tags or description

Looks like no one added any tags here yet for you.

67 Terms

1
<p>From a High-Level Program to an Executable File: Fill in the chart:</p>

From a High-Level Program to an Executable File: Fill in the chart:

<p></p>
New cards
2

Does Primary Memory hold information after the computer has been turned off? (T/F)

False

New cards
3

Primary Memory is fast and volatile. (T/F)

True

New cards
4

Secondary Memory is RAM. (T/F)

False

New cards
5

Secondary memory hold information after the program is terminated, but it is slow. (T/F)

True

New cards
6

List the five radices (specifically the one’s mention in class)

Binary, Decimal, Hexadecimal, Octal, and Base 64.

New cards
7

A byte is

8 bits

New cards
8

A nybble is

4 bits

New cards
9

What is the binary prefix?

0b

New cards
10

What is the octal prefix?

0

New cards
11

What is the hexadecimal prefix?

0x

New cards
12

What is the long suffix?

l or L

New cards
13

What is the long long suffix

ll or LL

New cards
14

What is the float suffix?

f or F

New cards
15

Name the fifteen “primative” data types from GREATEST to SMALLEST

A. long long double ,long double, float, signed long long int, unsigned long long int, signed long int, unsigned long int, signed int, unsigned int, signed short, unsigned int, signed short, unsigned short, signed char, unsigned char, bool, string (not a primitive)

B. long double, double, float, signed long long int, unsigned long long int, signed long int, unsigned long int, signed int, unsigned int, signed short, unsigned int, signed short, unsigned short, signed char, unsigned char, bool, string (not a primitive)

C. long double, double, float, unsigned long long int, signed long long int, unsigned long int, signed long int, unsigned int, signed int, unsigned short, signed int, unsigned short, signed short, unsigned char, signed char, bool, string (not a primitive)

D. long long double ,long double, double, float, unsigned long long int, signed long long int, unsigned long int, signed long int, unsigned int, signed int, unsigned short, signed int, unsigned short, signed short, unsigned char, signed char, bool, string (not a primitive)

C.

New cards
16

What is missing in this code? (Write the term)

[a]

[b] int main()

[c] {

[d] std::cout<<"Hello World";

[e] return 0;

[f] }

Missing preprocessor directive [a]

New cards
17

What is missing in this code? (Write the term)

[a] #include <iostream>

[b] int main()

[c] {

[d] std::cout<<"Hello World"

[e] return 0;

[f] }

Missing Punctuation [d]

New cards
18

What is missing in this code?

[a] #include <iostream>

[b] int main()

[c] {

[d] cout<<"Hello World";

[e] return 0;

[f] }

std::

New cards
19

Inputting in 2.3.5.1

Code:

int main()

{

int larry;

double bob;

char phil;

std::cin >> bob >> phil >> larry;

std::cout << std:: endl;

std::cout<< “larry:” << larry << std:: endl;

std::cout << cout << “bob:” << bob<< std:: endl;

std::cout << cout << “phil:” << phil<< std:: endl;

}

What will larry output? (ignoring the name)

5

New cards
20

Inputting in 2.3.5.1

Code:

int main()

{

int larry;

double bob;

char phil;

std::cin >> bob >> phil >> larry;

std::cout << std:: endl;

std::cout << “larry:” << larry << std:: endl;

std::cout << “bob:” << bob<< std:: endl;

std::cout << “phil:” << phil<< std:: endl;

}

What will bob output? (ignoring the name)

2.3

New cards
21

Inputting in 2.3.5.1

Code:

int main()

{

int larry;

double bob;

char phil;

std::cin >> bob >> phil >> larry;

std::cout << std:: endl;

std::cout << “larry:” << larry << std:: endl;

std::cout << “bob:” << bob<< std:: endl;

std::cout << “phil:” << phil<< std:: endl;

}

What will phil output? (ignoring the name)

.

New cards
22

What is the identifier rule? List ALL FOUR.

  1. Must start with a alphabetical character or underscore

  2. After the first character, you may use a number

  3. It can be a keyword

  4. Upper and lower are different

New cards
23

What is this << ?

Stream Assertion

New cards
24

What is this >> ?

Stream Extraction

New cards
25

To access and use log() function what will you need to add before?

#include <cmath>

New cards
26

To access and use setprecision() function what will you need to add before?

#include <iomanip>

New cards
27

What will setprecision(2) do to 2.954?

3

New cards
28

What will setprecision(2) when FIXED do to 2.954?

2.95

New cards
29

What will setprecision(1) do to 6.78?

7

New cards
30

What will setprecision(1) when FIXED do to 6.78?

6.8

New cards
31

What is 98 shifted << 2? (Show in binary)

136

New cards
32

What is 120 shifted >> 3? (Show in decimal)

15

New cards
33

What is base 10? Its goes from (0 to ?)

Decimal; (0-9)

New cards
34

What is base 8? Its goes from (0 to ?)

Octal; (0-7)

New cards
35

What is base 2? Its goes from (0 to ?)

Binary; (0-1)

New cards
36

What is base 16? Its goes from (0 to ?)

Hexadecimal; (0-9) (A-F)

New cards
37

What is 28?

256

New cards
38

What is 210?

1,024

New cards
39

Two Compliments: What is 1111 1111?

-1

New cards
40

Two Compliments: What is 0000 0000?

0

New cards
41

What is 10110110 unsigned char?

182

New cards
42

What is 10110110 signed char?

-74

New cards
43

What is 11010101 signed char?

-43

New cards
44

What is 11010110 unsigned char?

214

New cards
45

What is 11010110 unsigned char?

214

New cards
46

What is 11010110 signed char?

-42

New cards
47

What is 01100101 in decimal?

101

New cards
48

What is 011101 in decimal?

29

New cards
49

What is 111101 in decimal?

61

New cards
50

What is 98 in binary?

1100010

New cards
51

What is 579 in binary?

1001000011

New cards
52

What is 242 in binary?

11110010

New cards
53

What is 1AC in binary?

110101100

New cards
54

What is 1AC in decimal?

428

New cards
55

What is 1AC in octal?

654

New cards
56

What is 654 hexadecimal in octal?

3142

New cards
57

What is 654 hexadecimal in binary?

11001010100

New cards
58

What is 654 hexadecimal in decimal?

1620

New cards
59

What is the opposite of > ?

<=

New cards
60

What is the opposite of >= ?

<

New cards
61

What is the opposite of = ?

!=

New cards
62

What is the operator for AND?

&&

New cards
63

What is the operator for OR?

||

New cards
64

What is the operator for EQUALS?

==

New cards
65

What is the operator for NOT EQUALS?

!=

New cards
66

Given 5 is stored in a 1 bit signed variable x. What is the value of x << 6? (Write in decimal form)

64

New cards
67

Given 89 is stored in a 1 bit signed variable x. What is the value of x >> 3? (Write in decimal form)

11

New cards

Explore top notes

note Note
studied byStudied by 2220 people
... ago
4.7(3)
note Note
studied byStudied by 24 people
... ago
5.0(1)
note Note
studied byStudied by 42 people
... ago
5.0(2)
note Note
studied byStudied by 48 people
... ago
5.0(1)
note Note
studied byStudied by 452 people
... ago
5.0(3)
note Note
studied byStudied by 43 people
... ago
5.0(1)
note Note
studied byStudied by 19 people
... ago
4.5(2)
note Note
studied byStudied by 23406 people
... ago
4.5(119)

Explore top flashcards

flashcards Flashcard (41)
studied byStudied by 2 people
... ago
4.0(1)
flashcards Flashcard (26)
studied byStudied by 173 people
... ago
5.0(1)
flashcards Flashcard (48)
studied byStudied by 21 people
... ago
5.0(1)
flashcards Flashcard (41)
studied byStudied by 2 people
... ago
5.0(1)
flashcards Flashcard (47)
studied byStudied by 1 person
... ago
5.0(1)
flashcards Flashcard (22)
studied byStudied by 2 people
... ago
5.0(1)
flashcards Flashcard (20)
studied byStudied by 1 person
... ago
5.0(1)
flashcards Flashcard (22)
studied byStudied by 3 people
... ago
5.0(1)
robot