Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

10 10 Score This exam is closed book. You may have one 8.5\"x11\" note sheet. No

ID: 3904629 • Letter: 1

Question

10 10 Score This exam is closed book. You may have one 8.5"x11" note sheet. No computers. Assume that all questions refer to the ISO C99 standard. Problem "1 0points) Provide a short answer for each of the following questions. Be as specific as possible. a) What is the difference between program source code and pseudocode? b) Name a characteristic of the bubble sort algorithm that makes it inefficient when sorting an array. c) The scope of a function's parameter variables is local. Why does that matter for deeply recursive functions? d) In an abstract data structure, what kind of information is stored in each node (i.e., within a C structure)? What does it mean if the malloc() function returns a NULL value?

Explanation / Answer

Answer 1

A) Program is logic that is implemeted with certain rules to satisfy the particular programming languge and Psudo code set of steps which determines the only logic, Psedo code is comman for every language

B ) Loop continues even though the array is sorted

C) As the scope is Local, so for every recursive call it will create the new variable

D) Data and Pointer to the next node

E) If it fails to allocate memory than it will return NULL

Answer 2:

A

2.A.1 ) 0
2.A.2 ) 0
2.A.3 ) 2
2.A.4 ) 1

B

if(code==10){

printf("Too hot - turn equipment off ");

}

else if(code==15){

printf("Caution -recheck in 5 mintues ");

}

else{

printf("Normal temparature range ");

}

C

if(age>=13 && age <20)

teenager = true;

else

teenager = false;

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote