In Example 6.9 we described a common error in Pascal programs caused by the fact that and

Question:

In Example 6.9 we described a common error in Pascal programs caused by the fact that and and or have precedence comparable to that of the arithmetic operators. Show how a similar problem can arise in the stream-based I/O of C++ (described in Section C 8.7.3). (Consider the precedence of << and >>, and the operators that appear below them in the C column of Figure 6.1.)

Fortran Pascal Ada ++, -- (post-inc., dec.) abs (absolute value), ++, -- (pre-inc., dec.), +, - (unary), &, * (address, contents of), !, - (logical, bit-wise not) * (binary), /, % (modulo division) not not, ** *, /, 7, mod, rem div, mod, and +, - (unary and binary) +,

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Programming Language Pragmatics

ISBN: 9780124104099

4th Edition

Authors: Michael L. Scott

Question Posted: