An assignment operator is used for assigning a value to a variable. The most com

Need help with assignments?

Our qualified writers can create original, plagiarism-free papers in any format you choose (APA, MLA, Harvard, Chicago, etc.)

Order from us for quality, customized work in due time of your choice.

Click Here To Order Now

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

Need help with assignments?

Our qualified writers can create original, plagiarism-free papers in any format you choose (APA, MLA, Harvard, Chicago, etc.)

Order from us for quality, customized work in due time of your choice.

Click Here To Order Now