C++: Chapter 1
keywords
, or reserved words, have a specific meaning to the compiler and cannot be used in the program for other purposes. e.g, using, namespace, int, return.
C++ Source Files extension
.cpp
C (language)
A programming language which evolved from B. Lanuages for operating systems. Invented by Dennis Ritchie.
What is assembly code?
A very low level programming language that uses easier to remember labels to represent the machine code instructions. Ex ADDF3 R1, R2, R3. An assembler does the translation to machine code, which is easy because of the one to one correspondence.
What is a computer?
An electronic device that stores and processes data
C++
An extension of CC, developed by BjarneStroustrupat Bell Labs during 1983-1985. C++ added a number of features that improved the C language.
The assembler
Assembly Source File > Assembler > Machine Code File
#include
It is a preprocessor directive, all preprocessors begin with a #.
What is an operating system?
It is the program that runs the computer system. Windows, MacOS, and Linux are examples. The operating system monitors what is going on with the computer, moves information from the disk to main memory, communicates with the graphics driver, and executes operations.
Compiling Progam
Source file > Compiler > into a Source file > linker > executable file. Translated all at once, then linked, resulting in an executable file.
What is computer software?
The instructions that control the hardware to make it do specific tasks
What is computer hardware? What are some examples?
The physical aspects of a computer. e.g., CPU, memory, storage (disks, DVDs, flash drive), I/O devices, communication devices such as the network
What is machine code?
The primitive set of instructions that is understood by the CPU. Varies by CPU. In binary.
Unix
Was written in C. Developed by Dennis Ritchie with Ken Thompson.
Statement Terminator
a ; is a statement terminator, every statement in C++ must end with a semicolon.
byte
a sequence of 8 bits
What is a high level language?
are English-like and easy to learn and program. e.g., Fortran, COBOL, BASIC, PL/1, Pascal, C, C++, Java, and C#.
bit
is a Binary digIT 0 or 1
function
is a construct that contains statements . Every C++ program is executed from a main function.
gigabyte
is about 1 billion bytes
kilobyte
is about 1000 bytes
terabyte
is about 1000 gigabytes
megabyte
is about a million bytes.
Memory Unit
is an ordered sequence of bytes
Interpreted Languages
languages that are translated and executed a statement at a time. e.g., PERL, Lisp, Python, Javascript, Ruby, and BASIC.
cout
object along with a stream insertion operatorcan be used to display a string on the console.
Memory
stores data and programinstructions for the CPU to execute. is volatile, because information is lost when the power is turned off.