Which of the following statements about expressions

This preview shows page 7 - 10 out of 11 pages.

50. Which of the following statements about expressions is false? a. An expression is a sequence of operands and operators. b. Expressions always reduce to a single value. c. A complex expression contains more than one operator. d. If two operators with the same precedence occur in a complex expression, the precedence rules determine the order of evaluation. e. There are six expression categories. ____ 51. Given the following code, what is printed? int x; x = 4; printf("%d %d", x, x++); ____ 52. Given the following code, what is the value of x after the print statement? int x; x = 4; printf("%d %d", x, x--); ____ 53. Which of the following is a unary expression? ____ 54. Which of the following statements about unary expressions is true? a. The sizeof operator requires a parenthetical expression as its operand. b. The unary plus operator does not change the value of the expression. c. The unary minus operator subtracts one from the operand value. d. The unary minus operator has a side effect. ____ 55. Which of the following is not a multiplicative expression? ____ 56. Which of the following statements about precedence and associativity is true? ____ 57. Given a is 3, b is 4, and c is 5, what is the value of the expression --a * (3 + b) / 2 - c++ * b?
Image of page 7

Subscribe to view the full document.

Image of page 8
a. Boolean to character to integer to real d. Real to integer to Boolean to character b. Real to integer to character to Boolean e. Character to integer to real c. Character to Boolean to integer to real ____ 59. Which of the following statements about mixed expressions is false? a. A cast cannot be used to change an assigned value. b. An explicit cast can be used to change an expression type. c. An explicit cast on a variable changes its type in memory. d. An implicit cast is generated by the compiler automatically as necessary. e. An explicit cast must specify the type in parentheses. ____ 60. Which of the following statements about compound statements is false? ____
Image of page 9

Subscribe to view the full document.

Image of page 10
You've reached the end of this preview.
  • Spring '11
  • ColinArchibald
  • following statements

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern