x: FINAL EXAM-2018 Spr)) D FINAL EXAMpdf g MyLaGued.. Shudent ITEM>> FINAL EXAM
ID: 3912788 • Letter: X
Question
x: FINAL EXAM-2018 Spr)) D FINAL EXAMpdf g MyLaGued.. Shudent ITEM>> FINAL EXAM :CLASS> MAC-125 INSTRUCTOR> M. MULLER S Questions: 3 points each: Maximum score 45 1. Insertgonat before any of the following array parameters that can be changed to constant array paramcters. void output (double all. int size) //Precondition: af[0] through a[aize 1] have values. //Post.condition: a[O] through a(size 11 have been written out. void dropodd (int all. int size) //Precondition: ato] through alsize 1 have values. //Pout.conditi on: All odd numbers in ato through alsize - 1 /Thave been changed to o. 2. Write type definitions for the nodes and pointers in a linked list. Call the node type Nodetype and call the pointer type PointerType. The linked lists will be lists of letters. 3. Given the following class definition, write an appropriate definition for the member function set. class Temperature public void set (double nevDegrees, char newscale) : //Sets the member variables to the values given as double degrees char scale:// for Fahrenheit or "c for Celsius. laExplanation / Answer
Q1) void output(const double a[], int size);
void dropOdd(const int a[], int size);
Q2) typedef struct NodeType{
char letters[20];
struct NodeType *PointerType;
}
Q3) void set(double newDegrees, char newScale){
degrees = newDegrees;
scale = newScale;
}
Please let me know in case of any clarifications required. Thanks!
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.