Write symbolic constants for the binary arithmetic operators +, -, *, and /. Write a C program to illustrate the use of these symbolic constants.

Program Code:
#include<stdio.h>
#define PLUS +
#define MINUS -
#define MUL *
#define DIV /
#define MOD %
void main()
{
int a=20,b=30;
printf("\n addition=%d",a PLUS b);
printf("\n subtraction=%d",a MINUS b);
printf("\n multiplication=%d",a MUL b);
printf("\n division=%d",a DIV b);
printf("\n modulous=%d",a MOD b);
}
Mukesh Rajput

Mukesh Rajput

I am a Computer Engineer, a small amount of the programming tips as it’s my hobby, I love to travel and meet people so little about travel, a fashion lover and love to eat food, I am investing a good time to keep the body fit so little about fitness also..

Post A Comment:

0 comments: