Subtract Two Numbers without Arithmetic Operator C Program

C Program To Subtract Two Numbers without Subtraction Operator

Learn How To Subtract Two Numbers without using Subtraction () Operator in C Programming Language. We generally use Minus operator () to subtract one number from another. Here, we shall use the postfix decrement operator to find the product of the numbers. Alternatively, two numbers can be subtracted using Bitwise Operators.

The first code to find the subtraction of two numbers without using subtraction operator () makes use of the postfix () operator. If you want to subtract two integers without arithmetic operators, then you will have to use the bitwise operators which is demonstrated in the second program by using bitwise Shift Operators.

C Program To Subtract Two Numbers without using Subtraction Operator

C Program To Subtract Two Numbers using Bitwise Operators


Output

C Program To Subtract Two Numbers without using - Operator and using Bitwise Operators

If you have any compilation error or doubts in this C program to Subtract Two Integers using Bitwise Operators, let us know about it in the comment section below.

Recommended Programs
C Program For Addition of Two Numbers without using + Operator
C Program To Raise Positive Integer to Power
 C Program For Multiplication of Two Numbers without * Operator
C Program For Division of Two Numbers without using / Operator

Tushar Soni

I am Tushar Soni, Co - Founder of CodingAlpha. I am a computer science student from India and passionate about Web Development and Programming. Connect with me on Facebook | LinkedIn | Google Plus

Join The Discussion