Order from us for quality, customized work in due time of your choice.
An assignment operator is used for assigning a value to a variable. The most com
An assignment operator is used for assigning a value to a variable. The most common assignment operator is =.
Program :
#include
#include
void main()
{
int a = 5, c;
clrscr();
c = a; // c is 5
printf(“c = %dn”, c);
c += a; // c is 10
printf(“c = %dn”, c);
c -= a; // c is 5
printf(“c = %dn”, c);
c *= a; // c is 25
printf(“c = %dn”, c);
c /= a; // c is 5
printf(“c = %dn”, c);
c %= a; // c = 0
printf(“c = %dn”, c);
getch();
}
Output:
c = 5
c = 10
c = 5
c = 25
c = 5
c = 0
Order from us for quality, customized work in due time of your choice.