Step 1: Start
Step 2: Initialize a=0andb=1
Step 3: Print the values of aandb
Step 4: Print the results of arithmetic operations
(a+b),(a-b),(a * b),(a / b),a++,and++a
Step 5: End
kw.c
#include<stdio.h>intmain(){inta=0,b=1;printf("———————————————————————————————————————————");printf("\nProgram to perform arithmetic operations");printf("\n———————————————————————————————————————————");printf("\nValue of a | %d ",a);printf("\nValue of b | %d ",b);printf("\nValue of %d/%d | %d ",a,b,(a/b));printf("\nValue of %d+%d | %d ",a,b,(a+b));printf("\nValue of %d-%d | %d ",a,b,(a-b));printf("\nValue of %d*%d | %d ",a,b,(a*b));printf("\nValue of a++ | %d ",a++);printf("\nValue of ++a | %d ",++a);printf("\n———————————————————————————————————————————\n");return0;}
Output
kodingwindow@kw:~$ gcc kw.c kodingwindow@kw:~$ ./a.out
———————————————————————————————————————————
Program to perform arithmetic operations
———————————————————————————————————————————
Value of a | 0
Value of b | 1
Value of 0/1 | 0
Value of 0+1 | 1
Value of 0-1 | -1
Value of 0*1 | 0
Value of a++ | 0
Value of ++a | 2
———————————————————————————————————————————
kodingwindow@kw:~$
Dear User, Thank you for visitng KodingWindow. If you are interested in technical articles, latest technologies, and our journey further, please follow us on LinkedIn.