Question: Given the following constants and variable declarations .... #define PI 3.14159 #define MAX 500 double len,count; int step, size, val; step = 3; size =
Given the following constants and variable declarations
....
#define PI 3.14159
#define MAX 500
double len,count;
int step, size, val;
step = 3; size = 4; count = -1.0;
Explain the outcome of executing the following C statements given the constants and
initializations shown above. Give the resulting values where possible and provide an
explanation for any statements that give errors or compute values that may not be what
was intended.
val = step % size;
val = (450 - MAX)/ step;
len = PI * count;
len = step/size;
val = size/0;
val = step % (470-MAX);
len = size/count;
val = PI * step;
val = step % (MAX - 480) ;
len = (double) step/size;
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
