CSE 240 Final Review With 100% Correct Answers
Logic - ANSWER - based on formal logic and includes logic predicates for computation Functional - ANSWER - use of mathematical functions (based on Lambda Calculus) to express computation, simpler because of use of expressions Procedural/Imperative - ANSWER - processing actions one step at a time using variables and conditional statements Object Oriented - ANSWER - based on concept of objects and classes, pillars of OOP (Encapsulation, Abstraction, Inheritance and Polymorphism) Example of Logic Paradigm - ANSWER - Prolog Example of Functional Paradigm - ANSWER - Lisp Example of Procedural/Imperative Paradigm - ANSWER - C/C++ Example of Object Oriented Paradigm - ANSWER - Java, C++ Strongly typed langauges - ANSWER - Java, C++ Weakly typed languages - ANSWER - Prolog Compilation Stage - ANSWER - converts the code into machine code (creates an exe) before the program runs Interpretation Stage - ANSWER - converts code into machine code while the code is running How compiler works - ANSWER - source code - compiler - machine code - output How interpreter works - ANSWER - source code - interpreter - output Example of semantic error - ANSWER - Forgetting to divide by 100 when printing a percentage amount Example of semantic error - ANSWER - parameters not matching in function declaration and function call Semantic Errors - ANSWER - meaning error; things that don't make sense but do not violate lexical or syntactic rules Lexical Errors - ANSWER - tokens; spelling errors; variable names that start with numbers, numbers that have more than one decimal point, etc. Syntactic Errors - ANSWER - things that are supposed to follow but do not follow; grammar errors in a sentence Size of int - ANSWER - 4 bytes Size of array of ints - ANSWER - 4 * number of indices in array declaration
Geschreven voor
- Instelling
- CSE 240
- Vak
- CSE 240
Documentinformatie
- Geüpload op
- 1 mei 2024
- Aantal pagina's
- 3
- Geschreven in
- 2023/2024
- Type
- Tentamen (uitwerkingen)
- Bevat
- Vragen en antwoorden
Onderwerpen
-
logic answer based on formal logic and inc
Ook beschikbaar in voordeelbundel