Looks like no one added any tags here yet for you.
From a High-Level Program to an Executable File: Fill in the chart:
Does Primary Memory hold information after the computer has been turned off? (T/F)
False
Primary Memory is fast and volatile. (T/F)
True
Secondary Memory is RAM. (T/F)
False
Secondary memory hold information after the program is terminated, but it is slow. (T/F)
True
List the five radices (specifically the one’s mention in class)
Binary, Decimal, Hexadecimal, Octal, and Base 64.
A byte is
8 bits
A nybble is
4 bits
What is the binary prefix?
0b
What is the octal prefix?
0
What is the hexadecimal prefix?
0x
What is the long suffix?
l or L
What is the long long suffix
ll or LL
What is the float suffix?
f or F
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.
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]
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]
What is missing in this code?
[a] #include <iostream>
[b] int main()
[c] {
[d] cout<<"Hello World";
[e] return 0;
[f] }
std::
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
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
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)
.
What is the identifier rule? List ALL FOUR.
Must start with a alphabetical character or underscore
After the first character, you may use a number
It can be a keyword
Upper and lower are different
What is this << ?
Stream Assertion
What is this >> ?
Stream Extraction
To access and use log() function what will you need to add before?
#include <cmath>
To access and use setprecision() function what will you need to add before?
#include <iomanip>
What will setprecision(2) do to 2.954?
3
What will setprecision(2) when FIXED do to 2.954?
2.95
What will setprecision(1) do to 6.78?
7
What will setprecision(1) when FIXED do to 6.78?
6.8
What is 98 shifted << 2? (Show in binary)
136
What is 120 shifted >> 3? (Show in decimal)
15
What is base 10? Its goes from (0 to ?)
Decimal; (0-9)
What is base 8? Its goes from (0 to ?)
Octal; (0-7)
What is base 2? Its goes from (0 to ?)
Binary; (0-1)
What is base 16? Its goes from (0 to ?)
Hexadecimal; (0-9) (A-F)
What is 28?
256
What is 210?
1,024
Two Compliments: What is 1111 1111?
-1
Two Compliments: What is 0000 0000?
0
What is 10110110 unsigned char?
182
What is 10110110 signed char?
-74
What is 11010101 signed char?
-43
What is 11010110 unsigned char?
214
What is 11010110 unsigned char?
214
What is 11010110 signed char?
-42
What is 01100101 in decimal?
101
What is 011101 in decimal?
29
What is 111101 in decimal?
61
What is 98 in binary?
1100010
What is 579 in binary?
1001000011
What is 242 in binary?
11110010
What is 1AC in binary?
110101100
What is 1AC in decimal?
428
What is 1AC in octal?
654
What is 654 hexadecimal in octal?
3142
What is 654 hexadecimal in binary?
11001010100
What is 654 hexadecimal in decimal?
1620
What is the opposite of > ?
<=
What is the opposite of >= ?
<
What is the opposite of = ?
!=
What is the operator for AND?
&&
What is the operator for OR?
||
What is the operator for EQUALS?
==
What is the operator for NOT EQUALS?
!=
Given 5 is stored in a 1 bit signed variable x. What is the value of x << 6? (Write in decimal form)
64
Given 89 is stored in a 1 bit signed variable x. What is the value of x >> 3? (Write in decimal form)
11