[Cs35101] Correction in C code for Problem 4, typeos fixed in Homework 3

Dianne Foreback dforebac at kent.edu
Thu Oct 13 18:59:11 EDT 2016


Hello Computer Architecture Class:

I updated the posted homework 3 assignment on our website.  I clarified
problem 5 parts b and c.
And, for problem 3 make certain to use the percentages I gave, not those
from the book please.

The rewritten C code for problem 4 has a small mistake.  Correct code is
given below.

int f(int a, int b, int c, int d){
 return func(func(a,b),c+d); }

to

int f(int a, int b, int c, int d){
   int x;
   int y;
   int z;

   x = func(a,b);
   y = c + d;
   z = func(x, y)  // not z = func(y, z);
   return z;
}

Best,
Dianne
_______________________________________________
Dr. Dianne Foreback, Assistant Professor
Department of Computer Science
Math and Computer Science Building (MSB) 266
P.O. Box 5190, Kent, Ohio 44242-0001, USA
Phone: 330.672.9064
Email: dforebac at kent.edu
_______________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://listmail.cs.kent.edu/pipermail/cs35101/attachments/20161013/3e499d6c/attachment.html 


More information about the CS35101 mailing list