1730 - Midterm Deck Flashcards
(56 cards)
What is a program
a program is a set of instructions for a computer
What is an algorithm
an algorithm is a step-by-step approach to solving a problem
what kind of codes/languages did early computers use
machine code (binary) and assembly languages
what are some examples of high-level languages that we know
Java and C
how are higher-level languages better for us
they allow programmers to write code independent of hardware
what are some examples of operating systems
Unix, Windows, MacOS, Linux
what do operating systems do
manage computer resources and provide an interface for the users
what does a compiler do
it analyzes a program developed in a particular computer language and translates it into a form that is suitable for execution on your particular computer system
what is a syntactic error
an syntax error (like unbalanced parenthesis or brackets)
what is a semantic error
an error that occurs when special data is inserted when not defined (so like when you have an undefined variable)
compilation process
reads code line-by-line and if any error is found, it tells the programmer and ends.
if no semantic or syntactic errors are found then compiler translates code from higher lang. to lower lang. for the computer to understand
what process does the term “building” refer to
the process of compiling and linking a program
what happens after the compilation process
the compiled file is then linked to an executable file
what happens when linking
the assembler takes each assembly language and converts it into a binary format known as object code
what is the default name of an executable file in Unix
a.out
what is the difference between unsigned and signed numbers
unsigned = non-negative values, while signed includes negative values
i have a file called file1.txt on my laptop that I want to upload to odin… what would I type in?
scp file1.txt odinUsername@odin.cs.uga.edu:~/[relative path to where you want to upload it on odin]
I have a program called Connect4.c on odin that I want to download on my laptop… what would I do
- cd to where you want to save in on your device
- scp odinUdername@odin.cs.uga.edu:~/[realtive path of where the file is on odin/Connect4.c .
what are the 3 programming goals
- correctness
- readability
- optimization
difference between Java and C/C++ on compiling
Java needs a JVM, so when a program is compiled, the compiler produces a .class file that the JVM can understand.
C/C++ does not require a VM as the result of a “build” is an executable file that will run on the native operating system
what is the act of creating an executable file known as in C
linking
can you individually compile source files into object files in C like you have to in Java?
yes, you can.
what are the phases of C/C++ programs
- Edit
- Preprocess
- Compile
- Link
- Load
- Execute
T/F: Java has a preprocessor
False, and it is one of the most noticeable differences between Java and C/C++