Package deal
CSE 240 TESTS COMPILATION BUNDLE
CSE 240 TESTS COMPILATION BUNDLE
[Show more]CSE 240 TESTS COMPILATION BUNDLE
[Show more]Another term for the functional paradigm correct answer: applicative 
 
Another term for the logic paradigm correct answer: declaritive 
 
First translates all the statements of a program into assembly language code or machine code before any statement is executed correct answer: compilation 
 
C...
Preview 2 out of 7 pages
Add to cartAnother term for the functional paradigm correct answer: applicative 
 
Another term for the logic paradigm correct answer: declaritive 
 
First translates all the statements of a program into assembly language code or machine code before any statement is executed correct answer: compilation 
 
C...
True or false: Learning the concepts, logic and problem solving of programming unlocks our ability to learn knew languages. correct answer: True 
 
Reliability speaks to how easily a programmer can express themselves reliably within the language. correct answer: False 
 
Is sort orthogonality one-...
Preview 4 out of 54 pages
Add to cartTrue or false: Learning the concepts, logic and problem solving of programming unlocks our ability to learn knew languages. correct answer: True 
 
Reliability speaks to how easily a programmer can express themselves reliably within the language. correct answer: False 
 
Is sort orthogonality one-...
Explain how the following rules check if there is a miscolor in a map factbase. 
adjacent(X, Y) :- edge(X, Y); edge(Y, X).miscolor(S1, S2, Color1) :- adjacent(S1, S2), color(S1, Color1),color(S2, Color1). correct answer: Prolog runtime will iteratively apply the rules to all the facts to find the m...
Preview 3 out of 21 pages
Add to cartExplain how the following rules check if there is a miscolor in a map factbase. 
adjacent(X, Y) :- edge(X, Y); edge(Y, X).miscolor(S1, S2, Color1) :- adjacent(S1, S2), color(S1, Color1),color(S2, Color1). correct answer: Prolog runtime will iteratively apply the rules to all the facts to find the m...
Compilation of a program is to execute all the statements of the program completely. correct answer: False 
 
The syntactic structure of imperative programming languages normally include which of the following units correct answer: conditional statements, loppThis programming language uses two-ste...
Preview 2 out of 7 pages
Add to cartCompilation of a program is to execute all the statements of the program completely. correct answer: False 
 
The syntactic structure of imperative programming languages normally include which of the following units correct answer: conditional statements, loppThis programming language uses two-ste...
We use "Pass by Pointer" when: correct answer: Function wants to modify the value, the value is expensive to copy and NULL is valid 
 
We use "Pass by Constant Pointer" when: correct answer: Function does not want to modify the value, the value is expensive to copy and NULL is valid 
 
We use ...
Preview 2 out of 13 pages
Add to cartWe use "Pass by Pointer" when: correct answer: Function wants to modify the value, the value is expensive to copy and NULL is valid 
 
We use "Pass by Constant Pointer" when: correct answer: Function does not want to modify the value, the value is expensive to copy and NULL is valid 
 
We use ...
When evaluating a programming language the category Reusability describes: correct answer: This concept asks how tied down a language is to a particular platform, can code be distributed easily and can libraries be made and shared 
 
Autocode and FORTRAN are considered to be the first high-level pr...
Preview 4 out of 31 pages
Add to cartWhen evaluating a programming language the category Reusability describes: correct answer: This concept asks how tied down a language is to a particular platform, can code be distributed easily and can libraries be made and shared 
 
Autocode and FORTRAN are considered to be the first high-level pr...
According to the course policy and Student Code of Conduct discussed in the lecture, what are allowed? Select all that apply. correct answer: Study in a group on learning the course materials. 
 
Post homework questions in the course discussion board. 
 
What are course outcomes? correct answer: T...
Preview 2 out of 10 pages
Add to cartAccording to the course policy and Student Code of Conduct discussed in the lecture, what are allowed? Select all that apply. correct answer: Study in a group on learning the course materials. 
 
Post homework questions in the course discussion board. 
 
What are course outcomes? correct answer: T...
Stored Program Concept (von Neumann machine) is one of the most fundamental concepts in computer science. What programming paradigm most closely follows this concept? correct answer: imperative 
 
A set of basic principles, concepts, and methods for how a computation or algorithm is expressed corre...
Preview 2 out of 11 pages
Add to cartStored Program Concept (von Neumann machine) is one of the most fundamental concepts in computer science. What programming paradigm most closely follows this concept? correct answer: imperative 
 
A set of basic principles, concepts, and methods for how a computation or algorithm is expressed corre...
What is printed by the following code? 
int main () { 
int array[5] = {10,30,50,70,90}; 
int *p = array; 
cout << *(p+1) + *(&*p) + 1; return 0; 
} correct answer: 41 
 
What is the value in the variable Exam::total that is printed when this program is executed? 
#include<iostream> 
...
Preview 4 out of 42 pages
Add to cartWhat is printed by the following code? 
int main () { 
int array[5] = {10,30,50,70,90}; 
int *p = array; 
cout << *(p+1) + *(&*p) + 1; return 0; 
} correct answer: 41 
 
What is the value in the variable Exam::total that is printed when this program is executed? 
#include<iostream> 
...
If a function calls another function, the local variables in these two functions use the memory from correct answer: different stack frames. 
 
Which C/C++ operations will acquire memory from heap? Select all that apply. correct answer: - new 
- malloc 
 
You do not need to garbage-collect the mem...
Preview 3 out of 30 pages
Add to cartIf a function calls another function, the local variables in these two functions use the memory from correct answer: different stack frames. 
 
Which C/C++ operations will acquire memory from heap? Select all that apply. correct answer: - new 
- malloc 
 
You do not need to garbage-collect the mem...
What is equivalent code in C++ for the following LISP statement 
(if (< 1 2) (* 3 4) (/ 5 6) ) correct answer: if (1<2) return 3*4; else return 5/6; 
 
functions are created by calling a function-making macro. This macro is called correct answer: defun 
 
one feature of the functional paradi...
Preview 1 out of 4 pages
Add to cartWhat is equivalent code in C++ for the following LISP statement 
(if (< 1 2) (* 3 4) (/ 5 6) ) correct answer: if (1<2) return 3*4; else return 5/6; 
 
functions are created by calling a function-making macro. This macro is called correct answer: defun 
 
one feature of the functional paradi...
Which constructs do NOT have a loop when expressed in syntax graphs? 
1) if-then-else 
2) switch(expr) {case value:statements;} 
3) for ( <init-expr>; <test-expr>; <increment-expr> ) {<statements>} 
4) while (condition) do {statements;} correct answer: 1) if-then else 
2) fo...
Preview 2 out of 12 pages
Add to cartWhich constructs do NOT have a loop when expressed in syntax graphs? 
1) if-then-else 
2) switch(expr) {case value:statements;} 
3) for ( <init-expr>; <test-expr>; <increment-expr> ) {<statements>} 
4) while (condition) do {statements;} correct answer: 1) if-then else 
2) fo...
Syntactic Structure: Imperative Programming correct answer: Conditional statements; 
loop statements; 
variable declaration 
 
Interpretation of a program is the direct execution of one statement at a time sequentially. (T/F) correct answer: True 
 
Functional programming languages are low-level...
Preview 3 out of 19 pages
Add to cartSyntactic Structure: Imperative Programming correct answer: Conditional statements; 
loop statements; 
variable declaration 
 
Interpretation of a program is the direct execution of one statement at a time sequentially. (T/F) correct answer: True 
 
Functional programming languages are low-level...
What key feature of programming languages is supported by C++, but not Java? correct answer: Pointers 
 
In contrast to Web 1.0, what is the key function of Web 2.0? correct answer: Web is the computing platform 
 
What computing paradigm enforces stateless (no variable allowed) programming? corre...
Preview 3 out of 18 pages
Add to cartWhat key feature of programming languages is supported by C++, but not Java? correct answer: Pointers 
 
In contrast to Web 1.0, what is the key function of Web 2.0? correct answer: Web is the computing platform 
 
What computing paradigm enforces stateless (no variable allowed) programming? corre...
Functional programming languages do NOT allow us to define: correct answer: variables whose value can be modified. 
 
The statement "a function is a first-class object" means that a function correct answer: can be placed in a place where a value is expected. 
 
What notation requires parentheses...
Preview 3 out of 16 pages
Add to cartFunctional programming languages do NOT allow us to define: correct answer: variables whose value can be modified. 
 
The statement "a function is a first-class object" means that a function correct answer: can be placed in a place where a value is expected. 
 
What notation requires parentheses...
programming language correct answer: syntax definition, compiler, library 
 
how do we learn programming languages correct answer: learn concepts and paradigms, learn a representative in each program 
 
why learn multiple concepts and paradigms correct answer: increased capacity to express ideas,...
Preview 2 out of 8 pages
Add to cartprogramming language correct answer: syntax definition, compiler, library 
 
how do we learn programming languages correct answer: learn concepts and paradigms, learn a representative in each program 
 
why learn multiple concepts and paradigms correct answer: increased capacity to express ideas,...
A programming language can belong to multiple paradigms (T/F) correct answer: True 
 
Features of the imperative or procedural paradigm includes correct answer: Manipulation of named data(variables) and conditional statements 
 
(T/F) Logic programming languages divide the program into reasonable ...
Preview 2 out of 7 pages
Add to cartA programming language can belong to multiple paradigms (T/F) correct answer: True 
 
Features of the imperative or procedural paradigm includes correct answer: Manipulation of named data(variables) and conditional statements 
 
(T/F) Logic programming languages divide the program into reasonable ...
C++ Programming 
 
Which of the following instruction(s) create an array of 2 Rectangles and initialize them (the 2 Rectangles) with values? Select all the possible options. 
----------------------------------------------------------------------------- 
class Rectangle { 
private: 
 int width, heigh...
Preview 2 out of 12 pages
Add to cartC++ Programming 
 
Which of the following instruction(s) create an array of 2 Rectangles and initialize them (the 2 Rectangles) with values? Select all the possible options. 
----------------------------------------------------------------------------- 
class Rectangle { 
private: 
 int width, heigh...
Why are most programming languages similar to each other? correct answer: -They share the same mathematical foundation (Boolean) 
-Similar Functionality 
-Based on the same hardware and instruction sets 
-Common design goals 
-Designers share their design experiences 
 
What is a programming Paradi...
Preview 1 out of 4 pages
Add to cartWhy are most programming languages similar to each other? correct answer: -They share the same mathematical foundation (Boolean) 
-Similar Functionality 
-Based on the same hardware and instruction sets 
-Common design goals 
-Designers share their design experiences 
 
What is a programming Paradi...
Lexical Rules correct answer: 1. Identifiers. Names (programmers chosen) for something of interest (variables, functions, methods, classes, etc.) 
2. Keywords. names reserved by the language designer: if, switch, for, int, float, char, while, etc. 
3. Operators. +, *, <, >=, !, &&, ||, etc. 
...
Preview 2 out of 9 pages
Add to cartLexical Rules correct answer: 1. Identifiers. Names (programmers chosen) for something of interest (variables, functions, methods, classes, etc.) 
2. Keywords. names reserved by the language designer: if, switch, for, int, float, char, while, etc. 
3. Operators. +, *, <, >=, !, &&, ||, etc. 
...
A programming language can belong to multiple paradigms correct answer: True 
 
Logic langs divide the prog into reasonable sized pieces correct answer: False 
 
Prolog is a functional programming language correct answer: False 
 
The compiler executes the program correct answer: False 
 
Functi...
Preview 1 out of 4 pages
Add to cartA programming language can belong to multiple paradigms correct answer: True 
 
Logic langs divide the prog into reasonable sized pieces correct answer: False 
 
Prolog is a functional programming language correct answer: False 
 
The compiler executes the program correct answer: False 
 
Functi...
What is the key difference between a static variable and a global variable? A) They come from different parts of memory, or B) They have different visibility. correct answer: B 
 
What operations will acquire memory from heap? (declaration, free, malloc, new) correct answer: malloc, new 
 
If a fu...
Preview 2 out of 14 pages
Add to cartWhat is the key difference between a static variable and a global variable? A) They come from different parts of memory, or B) They have different visibility. correct answer: B 
 
What operations will acquire memory from heap? (declaration, free, malloc, new) correct answer: malloc, new 
 
If a fu...
Event-driven computing paradigm is to correct answer: define a set of events and write an event handler for each event 
 
What is the major improvement of structured programming languages over the earlier programming languages? correct answer: Removing Goto statement from the language 
 
What prog...
Preview 2 out of 15 pages
Add to cartEvent-driven computing paradigm is to correct answer: define a set of events and write an event handler for each event 
 
What is the major improvement of structured programming languages over the earlier programming languages? correct answer: Removing Goto statement from the language 
 
What prog...
In contrast to Web 1.0, what is the key function of Web 2.0? correct answer: Web is the computing platform 
 
What computing paradigm can solve a problem by describing the requirements, without writing code in a step-wise fashion to solve the problem? correct answer: Logic 
 
What is a feature of ...
Preview 2 out of 10 pages
Add to cartIn contrast to Web 1.0, what is the key function of Web 2.0? correct answer: Web is the computing platform 
 
What computing paradigm can solve a problem by describing the requirements, without writing code in a step-wise fashion to solve the problem? correct answer: Logic 
 
What is a feature of ...
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Stuvia is a marketplace, so you are not buying this document from us, but from seller Classroom. Stuvia facilitates payment to the seller.
No, you only buy these notes for $40.49. You're not tied to anything after your purchase.
4.6 stars on Google & Trustpilot (+1000 reviews)
85443 documents were sold in the last 30 days
Founded in 2010, the go-to place to buy study notes for 14 years now