• 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 4 out of 34 pages
Exam (elaborations)

Asu Cse 240 Midterm Frequently Tested Actual Exam Questions With Correct Answers

Document preview thumbnail
Preview 4 out of 34 pages

Asu Cse 240 Midterm Frequently Tested Actual Exam Questions With Correct Answers

Content preview

ASU CSE 240 MIDTERM
FREQUENTLY TESTED ACTUAL EXAM QUESTIONS
WITH CORRECT ANSWERS

Question 1.
In the C-Style input function scanf("%d", &i); What does the character "&" mean?

ANSWER
scanf takes the address of an variable as its parameter.



Question 2.
Given the snippet of code:
int x = 5;
int bar(int j) {
int *k = 0, m = 5;
k = &m;
return (j+m);
}
void main(void) {
static int i =0;
i++;
i = bar(i) + x;
}

ANSWER
CorrectB.
j
CorrectC.
k
CorrectD.
m



Question 3.
A fact starts with a relationship followed by a list of arguments. The arguments of a fact

ANSWER
can have a structure similar to that of a fact.






,Question 4.
One of the major differences between the imperative and functional programming languages is that
the functional programming languages do NOT

ANSWER
have side-effect.



Question 5.
Which of the following is equivalent to the expression below?
(car (cdr '(1 2 3 4 5))

ANSWER
(cadr '(1 2 3 4 5))



Question 6.
What data structure is used in Scheme for representing extremely large integers?

ANSWER
list



Question 7.
The complexity of searching an arbitrary binary search tree is the order of

ANSWER
O(n)



Question 8.
What keyword is used for defining an exception handler?

ANSWER
catch






,Question 9.
Given an expression: x1 + x2 + x3 + x4
Which language allows to evaluate the expression in this order:
(1) x1 plus x2; (2) x3 plus x4; (3) sum of ( x1 + x2 ) plus sum of ( x3 + x4 );

ANSWER
Scheme



Question 10.
Which of the following orthogonality describe this example:
If a block allows one statement, it should allow zero or more statments within that same block.

ANSWER
Number Orthogonality



Question 11.
Given this snippet of code, identify what is the stopping condition and return value?
void deleteList(struct contact* node) {
if (node == NULL) return;
else {
deleteList(node->next);
free(node);
}
}

ANSWER
deleteList(node->next);



Question 12.
When will the buffer be created?

ANSWER
When the file operation fopen is performed.






, Question 13.
int num1 = 5; //addressed at 1767612
int num2 = 10; //addressed at 1767600 int num3 = 15; //addressed at 1767588
char ch1 = 'a'; //addressed at 3734375
char ch2 = 'b'; //addressed at 3734363
char ch3 = 'c'; //addressed at 3734351
char* chPtr = &ch3;
int* iPtr = &num3;
*iPtr = num3 *(times) 8;
'*chPtr' = '*iPtr;'
What will the following statement output?
cout << ch3;

ANSWER
'x'



Question 14.
A throw statement is associated with a specific exception handler through the

ANSWER
the data type implied by the throw value.



Question 15.
Consider a path from the root to a leaf of a class tree based on the inheritance. Which class has the
most class members?

ANSWER
The class at the leaf of the tree.



Question 16.
What statement is accurate and correct?

ANSWER
There is only one Scheme list that is not a pair.

Document information

Uploaded on
October 16, 2026
Number of pages
34
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$17.99

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.
TopGradeInsider
4.1
(14)
Sold
194
Followers
1
Items
63129
Last sold
22 hours 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