• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 2 out of 6 pages
Exam (elaborations)

Asu Cse 240 Midterm Questions With Complete Solutions

Document preview thumbnail
Preview 2 out of 6 pages

Asu Cse 240 Midterm Questions With Complete Solutions

Content preview

ASU CSE 240 MIDTERM QUESTIONS WITH COMPLETE SOLUTIONS



A programming language can belong to multiple paradigms (T/F) - ans-True
d d d d d d d d d d




Features of the imperative or procedural paradigm includes - ans-
d d d d d d d d d




Manipulation of named data(variables) and conditional statements d d d d d d




(T/
F) Logic programming languages divide the program into reasonable sized pieces named fun
d d d d d d d d d d d d




ctions or procedures or modules or subroutines - ans-False
d d d d d d d d




Direct execution of one statement at a time sequentially - ans-Interpretation
d d d d d d d d d d




simpler semantics and computation expressions in terms of mathematical function are featur
d d d d d d d d d d d




es of which paradigm? - ans-Functional
d d d d d




Expressing computation in terms of logic predicates is a feature of which paradigm? - ans-
d d d d d d d d d d d d d d




Logic

Inheritance, classes & objects are features of which paradigm - ans-Object Oriented
d d d d d d d d d d d




A set of principles, concepts and methods that is commonly accepted by members of a group
d d d d d d d d d d d d d d d d




or community - ans-Programming Paradigm
d d d d




(T/F) Prolog is a functional programming language? - ans-False
d d d d d d d d




(T/F) the compiler executes the program - ans-False
d d d d d d d




The semantic structure of imperative programming languages normally include which of the f
d d d d d d d d d d d d




ollowing validations - ans- d d d




type matching, parameters type in a function declaration should match these in the function c
d d d d d d d d d d d d d d




all, unicity d




(T/F) Functional programming languages are low-level languages - ans-False
d d d d d d d d




(T/F) compilation of a program is to execute all the statements of the program completely -
d d d d d d d d d d d d d d d




ans-False
d




They syntactic structure of imperative programming languages normally include which of the
d d d d d d d d d d d d




following units? d




A. Operators B. keywords C. identifiers D. conditional statements E. loop statements F. varia
d d d d d d d d d d d d d d




ble declaration - ans-D, E, F
d d d d d

, What programming language uses two- d d d d




step translation with intermediate codes for execution? - ans-JAVA
d d d d d d d d




(T/
F) Interpretation of a program is the direct execution of one statement at a time sequentially. -
d d d d d d d d d d d d d d d d




ans-True
d




(T/F) during compilation, all statements of a program in a high-
d d d d d d d d d d




level language are converted to a low-level language. - ans-True
d d d d d d d d d




A set of primary values and the operations defined on these values - ans-data type
d d d d d d d d d d d d d d




The lexical structure of all programming languages are similar and include which of the followi
d d d d d d d d d d d d d d




ng units? d




A. Identifiers B. Loop statements C. Keywords D. operators E. literals F. variable declaration -
d d d d d d d d d d d d d d d




ans-A, C, D, E
d d d d




What does the follow code print? d d d d d




int foo(int *n) { d d d




*n = 30;
d d d




}int main() { d d




int i=15;
d d




foo(&i);
d




printf("i=%d\n",i);
d




i=10;
d




foo(&i);
d




printf("i=%d\n",i);
d




return 0;} - ans-i = 30
d d d d d d




i = 30
d d




What does this program print on the screen? d d d d d d d




#include <stdio.h> d




int main() { d d




int i=3, *j, k;
d d d d




j=&i;
d




printf("%d\n",i**j*i-*j);
d




return 0;
d d




} - ans-24
d d




A classification that specifies which type of value a variable has and what type of mathematica
d d d d d d d d d d d d d d d




l, logical or rational operations can be applied to it - ans-Data type
d d d d d d d d d d d d




A name given to a storage location - ans-Variable
d d d d d d d d




Fixed value that the program may not alter during its execution - ans-Constant
d d d d d d d d d d d d

Document information

Uploaded on
October 11, 2026
Number of pages
6
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$16.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
VICTORYSUCCESS
3.0
(2)
Sold
20
Followers
0
Items
2306
Last sold
3 weeks ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions