MCQs
None.
Because preincrement take one byte instruction & post increment takes two byte instruction
In this program, We are preincrementing and postincrementing the operands and saving it.
Output:
$ g++ incre5.cpp
$ a.out
311
In this program, we are adding the x value after preincrementing two times.
Output:
$ g++ incre4.cpp
$ a.out
14
In this program, the increment and decrement of evaluation of z will not be accounted because they are post.
Output:
$ g++ incre3.cpp
$ a.out
10
The values will be preincemented and predecremented, So it will print as 64.
Output:
$ g++ incre2.cpp
$ a.out
64
There are two types of increment/decrement. They are postfix and prefix.
Explanation:value of 'a' will be stored in c and then only it will be incremented.
Output:
$ g++ incre.cpp
$ a.out
21
None.
None.