Comp Sci Ch 1, Ch 2 Flashcards
What is a program?
a set of instructions executing at one time
What is a variable?
holds a value, stores it in memory
What is an algorithm?
a sequence of instructions that solve a problem
What are the 1st two lines of code?
include <isostream></isostream>
using namespace std;
What outputs onto screen?
cout «
What gets input?
cin»_space;
What does an int hold?
an integer value
What starts the main function?
main () and everything inside {}
What ends a program?
return 0;
What starts a new line?
endl; or /n
What is a single line comment?
//text
What is a multi line comment?
/* text */
/*text
*text
*text */
What makes a program more readble?
whitespace
What is a syntax error?
violates programming language
How should you fix errors?
one at a time and compile
What is a logic error?
a bug, your sequencing or math is wrong
What is a bit?
a switch, binary digits, 0 and 1
What is a ciruit?
a connection of switches
What is a memory?
instructions and data stored in 0s and 1s in thousands of addressed locations
What is a processor?
executes instructions of program
What are machine instructions?
instructions represented in 0s and 1s
What is an executable program?
sequence of machine instructions
What are assembly language instructions?
translate high level (words and numbers) language to executable programs
What is moore’s law?
the doubling of integrated circuits capacity every 18 months