2024-09-18 11:12:12 -06:00

347 B

  1. The following program fragments illustrate the logical operators. Show the output produced by each, assuming that i, j, and k are int variables.

a. i = 10; j = 5;

printf("%d", !i < j);

// Expected output: `1`, because `!i` evaluates to 0, and 0 is less than 5, so that expression evaluates to true, or 1.

b. i = 2; j =