Docsity

CS10 Midterm Review: Modules 1-4 Q&A, Study notes of Computer Science

Toggle sidebar
bg1
CS10 Midterm (Modules 1-4)
1985 - correct answerC++ published
Assembly Language - correct answerhuman readable processor instructions
Assignment Statement - correct answernumApples = 8;
left side is variable and right side is expression
Character literal - correct answersingle quotes
char myChar = 'm' ;
Clock - correct answera processor's instructions execute at a rate governed by the
processor's clock, which ticks at a specific frequency (GHz)
Compiler - correct answerprograms that translate high level language into executable
programs
Compound Operators - correct answer-=
+=
*=
/=
%=
Disk - correct answeraka hard drive - stores files and other data (non-volatile storage
with slower access.) also in terabytes
double - correct answerstores a floating-point number (real numbers like 98.6,
0.000001, or -667.45)
Equality Operators - correct answer==
!=
floating-point literal - correct answernumber with fractional part (10.0, 99.573)
From integer to double - correct answerstatic_cast<double>
getline(cin, stringVar); - correct answertakes entire line and inputs into a string
How many bits are in a byte? - correct answer8 bits = 1 byte
How many Boolean variables are there? - correct answer2 variables - true & false
pf3

Partial preview of the text

Download CS10 Midterm Review: Modules 1-4 Q&A and more Study notes Computer Science in PDF only on Docsity!

CS10 Midterm (Modules 1-4)

1985 - correct answerC++ published Assembly Language - correct answerhuman readable processor instructions Assignment Statement - correct answernumApples = 8; left side is variable and right side is expression Character literal - correct answersingle quotes char myChar = 'm' ; Clock - correct answera processor's instructions execute at a rate governed by the processor's clock, which ticks at a specific frequency (GHz) Compiler - correct answerprograms that translate high level language into executable programs Compound Operators - correct answer-= += *= /= %= Disk - correct answeraka hard drive - stores files and other data (non-volatile storage with slower access.) also in terabytes double - correct answerstores a floating-point number (real numbers like 98.6, 0.000001, or -667.45) Equality Operators - correct answer== != floating-point literal - correct answernumber with fractional part (10.0, 99.573) From integer to double - correct answerstatic_cast getline(cin, stringVar); - correct answertakes entire line and inputs into a string How many bits are in a byte? - correct answer8 bits = 1 byte How many Boolean variables are there? - correct answer2 variables - true & false

How to redirect a file as standard input into executable? - correct answer./a.out < in.text Identifiers - correct answervariable/function with sequence of letters (a-z, A-Z), underscores ( _ ), and digits (0-9) _numCars, numCars2, num_Cars If-else statement - correct answerexecutes one group of statements when an expression is true and another group of statements when the expression is false literal - correct answerspecific value in code like 2 Logical Operators - correct answer&& || ! Math functions - correct answersqrt(x), pow(x,y), fabs(x) Moore's Law - correct answerThe doubling of IC capacity roughly every 18 months Name of program that compiles source code? - correct answerg++ Numeric data - correct answerchar myVar; 8 bits short myVar; 16 bits long myVar; 32 bits long long myVar; 64 bits int myVar; 32 bits Processor - correct answerruns the computer's programs, reading, and executing instructions from memory - also in megabytes - cache memory chip sits on processor RAM - correct answeraka random-access memory - holds data read from storage (volatile storage with faster access usually located off processor chip) also in gigabytes Relational Operators - correct answer< <=

= runtime error - correct answerAn error that occurs while a program is executing. String literal - correct answerdouble quotes in a sequence of characters cout << "Hello" ; Syntax - correct answerthe rules of grammar of the language