C++ Exercises: Display the operation of pre and post increment and decrement
Pre and Post Increment/Decrement
Write a C++ program to display the operation of pre and post increment and decrement.
Sample Solution:
C++ Code :
Sample Output:
Display the operation of pre and post increment and decrement : -------------------------------------------------------------------- The number is : 57 After post increment by 1 the number is : 58 After pre increment by 1 the number is : 59 After increasing by 1 the number is : 60 After post decrement by 1 the number is : 59 After pre decrement by 1 the number is : 58 After decreasing by 1 the number is : 57
Flowchart:

C++ Code Editor:
Previous: Write a program in C++ to check overflow/underflow during various arithmetical operation.
Next: Write a program in C++ to formatting the output.
What is the difficulty level of this exercise?
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics