Kat H.

asked • 04/05/21

C Programming. First, fully parenthesize the following expressions according to the precedence and associativity rules.

First, fully parenthesize the following expressions according to the precedence and associativity rules. Then, replacing the variables and constants with the appropriate type names, show how the type of the expression is derived by replacing the highest precedence expressions with its resulting type.


The variables are:


char c;

int i;

unsigned u;

float f;


For example: i = u+1; parenthesizes as (i = (u+1));


The types are

(int = (unsigned + int));

then

(int = (unsigned)); /* usual arithmetic conversions */

then

(int); /* assignment */


a. c = u * f + 2.6L;

b. u += --f / u % 3;

c. i <<= u * - ++f;

d. u = i + 3 + 4 + 3.1;

e. u = 3.1 + i + 3 + 4;

f. c == (i << - --f) & 0xf;

1 Expert Answer

By:

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.