Assignment operator:-


An assignment operator is the operator used to assign a new value to a variable, property, event or indexer element in C# programming language. Assignment operators can also be used for logical operations such as bitwise logical operations or operations on integral operands and Boolean operands.




1.write a program to show assignment operators operation by taking user input.

#include<stdio.h>
void main()
{
    int a,b;
    printf("Enter the First Number=");
    scanf("%d",&a);
    printf("Enter the Second Number=");
    scanf("%d",&b);
    printf("Addition is %d\n",a+=b);
    printf("Substraction is %d\n",a-=b);   // now a=3
    printf("Multiplication is %d\n",a*=b); // now a=1
    printf("Division is %d\n",a/=b);       // now a=2
    printf("Remainder of is %d\n",a%=b);   // now a=1
}