CS 1331 Exam 1 with correct detailed
|!! |!! |!! |!! |!! |!! |!!
solutions
What are the two primary types of languages? - correct
|!! |!! |!! |!! |!! |!! |!! |!! |!! |!!
answer✔✔interpreted and compiled |!! |!!
What is an example of an interpreted language? - correct
|!! |!! |!! |!! |!! |!! |!! |!! |!! |!!
answer✔✔python
How does an interpreted language run? - correct answer✔✔line-by-line;
|!! |!! |!! |!! |!! |!! |!! |!! |!!
write code once and run anywhere that has an interpreter
|!! |!! |!! |!! |!! |!! |!! |!! |!!
What is source code? - correct answer✔✔code that we write
|!! |!! |!! |!! |!! |!! |!! |!! |!!
What does the interpreter do? - correct answer✔✔runs program by telling
|!! |!! |!! |!! |!! |!! |!! |!! |!! |!! |!!
CPO what to do
|!! |!! |!!
What is the process for interpreted languages? - correct answer✔✔source
|!! |!! |!! |!! |!! |!! |!! |!! |!! |!!
code --> interpreter
|!! |!!
What is an example of a compiled language? - correct answer✔✔C/C++
|!! |!! |!! |!! |!! |!! |!! |!! |!! |!!
What is the process for compiled languages? - correct answer✔✔source
|!! |!! |!! |!! |!! |!! |!! |!! |!! |!!
code --> compiler --> machine code --> executable file (can then be run
|!! |!! |!! |!! |!! |!! |!! |!! |!! |!! |!! |!! |!!
seperately)
Is java an interpreted or compiled language? - correct answer✔✔both
|!! |!! |!! |!! |!! |!! |!! |!! |!!
, What is the source code in java? - correct answer✔✔.java files
|!! |!! |!! |!! |!! |!! |!! |!! |!! |!!
What command compiles? - correct answer✔✔javac
|!! |!! |!! |!! |!!
What files contain the java bytecode? - correct answer✔✔.class
|!! |!! |!! |!! |!! |!! |!! |!!
What is the process for running a java program? - correct answer✔✔source
|!! |!! |!! |!! |!! |!! |!! |!! |!! |!! |!!
code --> java compiler --> java bytecode --> JRE/JVM
|!! |!! |!! |!! |!! |!! |!! |!! |!!
What does JRE stand for? - correct answer✔✔Java Runtime Environment
|!! |!! |!! |!! |!! |!! |!! |!! |!!
What does JVM stand for? - correct answer✔✔Java Virtual Machine
|!! |!! |!! |!! |!! |!! |!! |!! |!!
What command runs the bytecode? - correct answer✔✔java
|!! |!! |!! |!! |!! |!! |!!
What is the syntax in java? - correct answer✔✔lines of code
|!! |!! |!! |!! |!! |!! |!! |!! |!! |!!
What are the semantics of java? - correct answer✔✔what the code does
|!! |!! |!! |!! |!! |!! |!! |!! |!! |!! |!!
What is a class in object oriented programming? - correct
|!! |!! |!! |!! |!! |!! |!! |!! |!! |!!
answer✔✔collection of states and behaviors that describe an object |!! |!! |!! |!! |!! |!! |!! |!!
What is the syntax for declaring variables? - correct answer✔✔<type>
|!! |!! |!! |!! |!! |!! |!! |!! |!! |!!
<identifier>
What are the requirements for identifiers? - correct answer✔✔must start
|!! |!! |!! |!! |!! |!! |!! |!! |!! |!!
with a letter and can be followed by letters, numbers, and underscores
|!! |!! |!! |!! |!! |!! |!! |!! |!! |!! |!!
|!! |!! |!! |!! |!! |!! |!!
solutions
What are the two primary types of languages? - correct
|!! |!! |!! |!! |!! |!! |!! |!! |!! |!!
answer✔✔interpreted and compiled |!! |!!
What is an example of an interpreted language? - correct
|!! |!! |!! |!! |!! |!! |!! |!! |!! |!!
answer✔✔python
How does an interpreted language run? - correct answer✔✔line-by-line;
|!! |!! |!! |!! |!! |!! |!! |!! |!!
write code once and run anywhere that has an interpreter
|!! |!! |!! |!! |!! |!! |!! |!! |!!
What is source code? - correct answer✔✔code that we write
|!! |!! |!! |!! |!! |!! |!! |!! |!!
What does the interpreter do? - correct answer✔✔runs program by telling
|!! |!! |!! |!! |!! |!! |!! |!! |!! |!! |!!
CPO what to do
|!! |!! |!!
What is the process for interpreted languages? - correct answer✔✔source
|!! |!! |!! |!! |!! |!! |!! |!! |!! |!!
code --> interpreter
|!! |!!
What is an example of a compiled language? - correct answer✔✔C/C++
|!! |!! |!! |!! |!! |!! |!! |!! |!! |!!
What is the process for compiled languages? - correct answer✔✔source
|!! |!! |!! |!! |!! |!! |!! |!! |!! |!!
code --> compiler --> machine code --> executable file (can then be run
|!! |!! |!! |!! |!! |!! |!! |!! |!! |!! |!! |!! |!!
seperately)
Is java an interpreted or compiled language? - correct answer✔✔both
|!! |!! |!! |!! |!! |!! |!! |!! |!!
, What is the source code in java? - correct answer✔✔.java files
|!! |!! |!! |!! |!! |!! |!! |!! |!! |!!
What command compiles? - correct answer✔✔javac
|!! |!! |!! |!! |!!
What files contain the java bytecode? - correct answer✔✔.class
|!! |!! |!! |!! |!! |!! |!! |!!
What is the process for running a java program? - correct answer✔✔source
|!! |!! |!! |!! |!! |!! |!! |!! |!! |!! |!!
code --> java compiler --> java bytecode --> JRE/JVM
|!! |!! |!! |!! |!! |!! |!! |!! |!!
What does JRE stand for? - correct answer✔✔Java Runtime Environment
|!! |!! |!! |!! |!! |!! |!! |!! |!!
What does JVM stand for? - correct answer✔✔Java Virtual Machine
|!! |!! |!! |!! |!! |!! |!! |!! |!!
What command runs the bytecode? - correct answer✔✔java
|!! |!! |!! |!! |!! |!! |!!
What is the syntax in java? - correct answer✔✔lines of code
|!! |!! |!! |!! |!! |!! |!! |!! |!! |!!
What are the semantics of java? - correct answer✔✔what the code does
|!! |!! |!! |!! |!! |!! |!! |!! |!! |!! |!!
What is a class in object oriented programming? - correct
|!! |!! |!! |!! |!! |!! |!! |!! |!! |!!
answer✔✔collection of states and behaviors that describe an object |!! |!! |!! |!! |!! |!! |!! |!!
What is the syntax for declaring variables? - correct answer✔✔<type>
|!! |!! |!! |!! |!! |!! |!! |!! |!! |!!
<identifier>
What are the requirements for identifiers? - correct answer✔✔must start
|!! |!! |!! |!! |!! |!! |!! |!! |!! |!!
with a letter and can be followed by letters, numbers, and underscores
|!! |!! |!! |!! |!! |!! |!! |!! |!! |!! |!!