[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Questions on Assignment 1 for ECE 8473
- To: ECE 8473
- Subject: Re: Questions on Assignment 1 for ECE 8473
- From: Rick Perry <richard.perry@villanova.edu>
- Date: Wed, 31 Aug 2022 07:25:05 -0400
> I wanted to clarify what you meant by ...
For the first one, note that adding 1 to the max unsigned value makes it wrap around to 0, e.g.
unsigned char c = UCHAR_MAX;
++c;
// now c is 0
So going the other way, if you start with c=0 and then subtract 1,
that should wrap around to the max.
For the double ones, just put those computations into some double variable
and then print the variable, e.g. double x = DBL_TRUE_MIN/2; then print x.