Machine-translated by Google. Questions are authored in English.
Top

Discussion

Which of the following cannot be used as LHS of the expression in for (exp1;exp2; exp3) ?

  • A.Variable
  • B.Function
  • C.typedef
  • D.macros

Answer: D

Correct answer: macros

The three parts of a for are ordinary expressions, so anything assignable can appear on the left of an assignment in them - a variable, or the result of a function returning a modifiable lvalue. A macro is only text, replaced before compilation, so what appears in the code is whatever it expands to; it is not itself an object and cannot be assigned to.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.