Save
Upgrade to remove ads
Busy. Please wait.
Log in with Clever
or

show password
Forgot Password?

Don't have an account?  Sign up 
Sign up using Clever
or

Username is available taken
show password


Make sure to remember your password. If you forget it there is no way for StudyStack to send you a reset link. You would need to create a new account.
Your email address is only used to allow you to reset your password. See our Privacy Policy and Terms of Service.


Already a StudyStack user? Log In

Reset Password
Enter the associated with your account, and we'll email you a link to reset your password.
focusNode
Didn't know it?
click below
 
Knew it?
click below
Don't Know
Remaining cards (0)
Know
0:00
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.

  Normal Size     Small Size show me how

CECS 342 Quiz 1

QuestionAnswer
Three Primary Language Evaluation Criteria 1. Readability 2. Writability 3. Reliability
Orthogonality A property where a small set of primitive constructs can be combined in a relatively small number of ways, and every combination is legal and meaningful.
Lexical Analysis The first phase of compilation that converts characters in the source program into lexical units (tokens).
Syntax Analysis The compilation phase (parsing) that transforms tokens into a hierarchical structure called a parse tree.
Semantic Analysis The phase that checks for errors difficult to find during parsing, such as type mismatches (e.g., adding a string to an integer).
Define: Von Neumann Architecture The basis for imperative languages where data and programs are stored in the same memory and executed by a CPU.
Von Neumann Bottleneck The limitation in computer speed caused by the fact that the connection between the CPU and memory is much slower than the CPU's execution speed.
Aliasing Having two or more distinct names (references) for the same memory location, which often reduces reliability.
Logic Programming Category A language category based on formal logic and rule-based systems rather than the Von Neumann architecture (e.g., Prolog).
Functional Programming Category A category modeled after mathematical functions, emphasizing the application of functions to parameters (e.g., LISP, Haskell).
Imperative Programming Category Languages that use variables, assignment statements, and iteration, closely mimicking the Von Neumann architecture (e.g., C, Java).
Pure Interpretation A system where programs are decoded and executed line-by-line by another program (the interpreter) without being translated to machine code.
Hybrid Implementation System A compromise system that translates high-level code into an intermediate language (Bytecode) for easier interpretation (e.g., Java, .NET).
Optimization Phase An optional compilation stage that attempts to improve the program by making it smaller or faster.
Abstraction The ability to define and use complex structures or operations in ways that allow many of the details to be ignored.
Type Checking Testing for type errors in a given program, either at compile-time or run-time.
Exception Handling The ability of a program to intercept run-time errors and take corrective measures, enhancing reliability.
Cost of a Language A criteria including training programmers, writing programs, compiling, executing, and maintenance.
Symbol Table A database used by the compiler to store information about user-defined names (variables, functions, etc.) and their attributes.
Parse Tree A hierarchical representation of the syntactic structure of a program.
Just-In-Time (JIT) Compilation A hybrid method where bytecode is translated into machine code instructions at the time they are needed during execution.
Preprocessors Programs that process the code before it reaches the compiler, often used for macro expansion (e.g., #include in C).
Simplest Language Complexity A language that has a small number of basic constructs, which generally improves readability.
Syntax Syntax is the form or structure of the expressions;
Semantics Semantics is the actual meaning of those expressions.
The ‘R-W-R’ Mnemonic Readability, Writability, and Reliability.
Fibonacci Sequence A series of numbers where each number is the sum of the two preceding ones, usually starting with 0 or 1.
What is the difference between an interpreted language and a compiled languages? Compiled language (C++): Translated into machine code before running (faster) Interpreted Language (Python): Executed line by line at running time (slower, but easier to write and debug)
Why is C++ generally faster than Python? C++ is compiled to machine code. C++ also gives more control over memory and performance. Python uses dynamic typing (adds runtime cost)
int fib(int n) { if (n <= 1) return n; return fib(n-1) + fib(n-2); } What type of Fibonacci implementation is this? Recursive Fibonacci
What is a major problem with this recursive approach? Time Complexity: O(2^n) It is very slow for large n because it repeats many calculations
int fib(int n) { int a = 0, b = 1; for(int i = 0; i < n; i++) { int temp = a + b; a = b; b = temp; } return a; } What is this approach called? Iterative Fibonacci Time Complexity: O(n)
Why is Iterative faster than recursive? Avoids repeated calculations, runs in linear time O(n), and uses constant memory O(1)
Created by: MinYoongi67
 

 



Voices

Use these flashcards to help memorize information. Look at the large card and try to recall what is on the other side. Then click the card to flip it. If you knew the answer, click the green Know box. Otherwise, click the red Don't know box.

When you've placed seven or more cards in the Don't know box, click "retry" to try those cards again.

If you've accidentally put the card in the wrong box, just click on the card to take it out of the box.

You can also use your keyboard to move the cards as follows:

If you are logged in to your account, this website will remember which cards you know and don't know so that they are in the same box the next time you log in.

When you need a break, try one of the other activities listed below the flashcards like Matching, Snowman, or Hungry Bug. Although it may feel like you're playing a game, your brain is still making more connections with the information to help you out.

To see how well you know the information, try the Quiz or Test activity.

Pass complete!
"Know" box contains:
Time elapsed:
Retries:
restart all cards