2) A computer's main/primary memory is known as RAM (Random Access Memory). What is meant by random access memory?
3) Suppose we have the following declarations:
int i = 2;
int j = 3;
int k = 4;
int m, n;
Determine the value assigned to the variable in each of the following assignment statements.
a) m = i + j * k; |
e) m = i + j % k; |
b) m = (i + j) * k; | f) m = (i + j) % k; |
c) m = i + j / k; | g) m = i + j * k + 2; |
d) m = (i + j) / k; | h) m = i + j * (k + 2); |
4) Write a C expression to compute the following:
a) i2 + 4 i j
b) The remainder of
5) Write a C program that prompts for a temperature, reads the temperature and prints the appropriate message according to the following:
Temperature | Message |
88 or hotter | "Its cooking out there!" |
80 to 87 | "Its alittle warm out there!" |
65 to 79 | "Its nice outside!" |
64 or below | "Its cool outside!" |