The following function demonstrates subtraction:
void f (int a, int b) {
int sub = a - b; // store the difference of a and b
// ...
}
substracion of any two number program in c
The distributive property of subtraction states that when subtracting a number from the sum of two other numbers, you can subtract the same number from each of the two numbers separately, and then subtract the two results. This can be represented as: a - (b + c) = (a - b) + (a - c).
You can add a point in C/C++. The legal operations on a pointer are that you can 1.) add a constant, 2.) subtract a constant, and 3.) subtract two pointers that refer to the same array. Anything else is meaningless.
The following arithmetic operators are available in c:+ - addition -> used to add two numbers- - subtraction ->used to subtract two numbers* - multiplication ->used to multiply two numbers/ - division -> used to divide two numbers% - modulus -> used to determine the remainder when two numbers are divided. a%b return the remainder when a is divided by b(can be used with only integer data types).
Get the input of two numbers from the user.a,bAdd those two numbers and store the value in another variable.c=a+b;print the value c
Not possible. Of course you can call a function which does the addition for you, but function-calling is also an operator in C.
int a = 1 + 2; ---------- int a = 1; int b = 2; a += b;
The native C language will not permit the addition of two 100 digit numbers with native data types. Therefore, you need to simulate the 100 digit numbers differently, and that can be done various ways, including using an arbitrary precision math package, or BCD arithmetic, etc.
Deal with the real and imaginary parts separately. So (a + ib) - (c + id) = (a - c) + i(b - d)
The question is malformed and incomprehensible.
You cannot compare 2 numbers without using relational operators. Certainly, you could subtract them, but you still need to test the result, and that is a relational operator in itself.
Compiler and Programmer these are the two components of the C language