Home / Programs / Write a program to demonstrate the results obtained by using the increment operators on operands in post- mode in an arithmetic expression.
Programming Example

Write a program to demonstrate the results obtained by using the increment operators on operands in post- mode in an arithmetic expression.

👁 927 Views
💻 Practical Program
📘 Step by Step Learning
Write a program to demonstrate the results obtained by using the increment operators on operands in post- mode in an arithmetic expression.

Program Code

/*
 Program:  Write a program to demonstrate the results obtained by using the increment operators on operands in post- mode in an arithmetic expression.  
  
 Author: www.atnyla.com  
 
*/ 

#include "stdio.h"  
int main()
{
int x = 4;
printf("Result = %d\n",x++ + x);
return 0;
} 

Output

Result = 8
Press any key to continue . . .

Explanation

None

How to learn from this program

First read the algorithm, then study the program code line by line. After that, compare the code with the output and finally go through the explanation. This approach helps learners understand both the logic and the implementation properly.