Computer Science
Answer
| Assignment | Expression |
|---|---|
| Assignment is the process in which Assignment operator (=) is used to assign a literal, value of a variable, the result of any expression or the return value of a method to a variable. | Expression is a set of variables, constants and arithmetical operators. |
| Example: int a = 10; int b = a * 4; | Example: a++ + ++a x * x + 4 |
Related Questions
Distinguish between Prefix and Postfix operator
Distinguish between Variables and Constants
How does a boolean literal differ from a String literal? Explain.
Evaluate the following expressions, if the values of the variables are:
int p,w,k;
p, w, k = 8; int m = 11, r = 7;(a) p += m + (--r + k) + 3 * (m++) * m;
(b) k += --m % 5 + m++ * 10 + r++;
(c) w = k * m++ / 3 + k + --r + r++;
(d) p *= r++ % 7 + --m % 5 + k * ++k + 8 * --k;
(e) k /= m++ * --r + 4 * r++ + --k + m * ++p / 3;