answersLogoWhite

0

The following function demonstrates subtraction:

void f (int a, int b) {

int sub = a - b; // store the difference of a and b

// ...

}

User Avatar

Wiki User

8y ago

What else can I help you with?

Related Questions

Write a programme for substraction of two numbers in c language?

substracion of any two number program in c


What is the distributive property of subtraction?

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).


Why pointer can't be added in computer language 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.


What are the arithmetic operator available in c?

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).


How we can write the algorithim of sum of two language?

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


How do you add two numbers with out using operator in c language?

Not possible. Of course you can call a function which does the addition for you, but function-calling is also an operator in C.


How do you add two numbers in c language?

int a = 1 + 2; ---------- int a = 1; int b = 2; a += b;


Who to Write a programme for addition of two 100 digit numbers in c language?

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.


How do you subtract complex numbers?

Deal with the real and imaginary parts separately. So (a + ib) - (c + id) = (a - c) + i(b - d)


Write a program in C language to multiply any two numbers without using in source code?

The question is malformed and incomprehensible.


How do you compare two numbers without using any operators in c?

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.


What are the components of c language?

Compiler and Programmer these are the two components of the C language