an electronic device capable of performing commands (input, output, storage, arithmetic and logic operations)
question
hardware
answer
the physical components of a computer and its surrounding (peripheral) devices
question
software
answer
sets of instructions to be executed by the computer, i.e., programs
question
system software
answer
programs designed to control the computer
question
operating system
answer
a set of programs that control overall computer activity and provide services
question
Windows and Linux
answer
The two operating systems that the CS computer lab machines boot to.
question
CPU and main memory, secondary storage, input and output devices
answer
basic components of computer hardware
question
application software
answer
programs designed to perform specific tasks
question
system software and application software
answer
the two main types of software
question
editor
answer
program used to create and modify text based files
question
emacs
answer
editor used in CS labs
question
case sensitive
answer
both linux and C++ are ___________, meaning that upper case and lower case letters are different
question
ASCII
answer
collating code commonly used by computers for encoding data into sequences of bits
question
128 (numbered 0-127)
answer
the number of characters in ASCII
question
machine language, assembly language, and high-level language
answer
types of programming languages
question
machine language
answer
instructions made up of sequences of 0s and 1s
question
assembly language
answer
instructions made up of mnemonic codes
question
high-level language
answer
instructions are closer to natural language, use familiar words and symbols
question
machine language
answer
programming language that:
- is the only language directly understood and executed by the computer
-is machine dependent
question
assembly language
answer
programming language that:
- must be translated to machine language by a program called an assembler
- is machine dependent
question
high-level language
answer
programming language that:
- is machine independent
- must be translated by a compiler
question
BASIC, FORTRAN, Pascal, Java, C, C++
answer
Examples of high-level languages
question
compiler
answer
a program that translates instructions written in a high-level language into the equivalent machine code
question
g++
answer
the compiler used in the CS labs for C++
question
#include
using namespace std;
int main()
{
return 0;
}
answer
the parts required in every C++ program
question
Program Development
answer
a problem solving process
question
Analysis, Implementation, Maintenance
answer
Three steps of Program Development
question
algorithm
answer
a step-by-step procedure for solving a problem in a finite amount of time
question
source file
answer
a human readable file that contains C++ program
question
object file
answer
executable version of program
question
program
answer
a sequence of statements whose objective is to accomplish a task
question
programming
answer
process of planning and creating a program
question
programming language
answer
a set of rules, symbols, and special words
question
syntax
answer
grammar rules of the language; compiler will try to identify and locate syntax errors
question
semantics
answer
meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
question
comments
answer
nonexecutable statements that are included in a program to provide information about what the program does, how it works, what input is expected, what output is generated, who wrote it, etc.
question
preprocessor directives
answer
tells the computer where to find the library for operations and data types
question
preprocessor
answer
a program that finds and attaches to your program the indicated libraries for compilation
question
#include
answer
preprocessor directive syntax
question
using namespace std;
answer
place where identifiers used in the system provided header files are defined
question
token
answer
smallest individual unit of a programming language - special symbols, word symbols, identifiers
question
special symbols
answer
+ - * / . ; ? , < > <= >= ! != & |
question
reserved words
answer
words that are used for special purposes in a program
question
int namespace include using return
answer
examples of reserve words
question
identifiers
answer
names of things that are used in a program, can apply to variables, constants, and functions
question
whitespace
answer
characters used to separate symbols, reserved words, identifiers and statements; include blanks, tabs and newline (linefeed) characters
question
data type
answer
a set of values together with a set of operations
question
int values
answer
whole numbers, no decimals and no commas included
question
char
answer
single letters, digits, special symbols; enclose value in single quotes ('a' '?' '8')
question
escape sequences
answer
use 2 characters to represent one
'n' = newline
't' = tab
question
floating-point category: float, double
answer
data types that refer to numbers with decimals
question
Arithmetic Operators
answer
* / % + -
question
arithmetic expression
answer
a sequence of operands and operators that describe a calculation to be performed
question
operator
answer
symbol that denotes an action to be performed
question
unary operator
answer
operator with only one operand
question
binary operator
answer
operator with two operands
question
operand
answer
value, identifier, or expression that is part of the calculation to be performed
question
like-type expression
answer
an expression in which all operands have the same data type - result will have the same data type as operands
question
% modulus
answer
an operator that can only be used with int values. result will always be an int.
question
mixed expression
answer
an expression that has operands with different data types
question
type coercion
answer
when a value of one data type is implicitly (automatically) changed to another data type
question
allocating memory
answer
associate an identifier with a memory location
question
variable
answer
a memory location with a name and data type, its content may be changed during program execution
question
named constant
answer
a memory location with a name and data type and a value, its content (value) cannot be changed during program execution
question
const datatype identifier = value;
answer
syntax for named constant declaration
question
assignment statement
answer
allows the programmer to store a value in a variable
question
type casting (conversion)
answer
programmer explicitly indicates that a value is to be converted to another type