//Unary Vs. Binary Operators
// multiplication is a binary operator
//unary operators only needs one operand.
//Let’s make a C program to check this matter in more detail.
#include <stdio.h>
int main(void) {
int bank;
int expenditure;
int final;
bank=1000; //declare variable. we are ignoring pennies here!
expenditure=100;
final=bank-expenditure; // – is a binary operator here.
printf(“Final bank acccount is %d\n\n”, bank);
printf(“Expense is %d\n\n”, -expenditure); // – is acting like an unary operator
return 0;
}
Output: