C augmented assignment operators compund assignment tutorial example explained
#C #augmented #assignment
// augmented assignment operators = used to replace a statement where an operator
// takes a variable as one of its arguments
// and then assigns the result back to the same variable
// x = x + 1
// x+=1
int x = 10;
//x = x + 2;
//x+=2;
//x = x - 3;
//x-=3;
//x = x * 4;
//x*=4;
//x = x / 5;
//x/=5;
//x = x % 2;
//x%=2;
printf("%d", x);
return 0;
#C #augmented #assignment
// augmented assignment operators = used to replace a statement where an operator
// takes a variable as one of its arguments
// and then assigns the result back to the same variable
// x = x + 1
// x+=1
int x = 10;
//x = x + 2;
//x+=2;
//x = x - 3;
//x-=3;
//x = x * 4;
//x*=4;
//x = x / 5;
//x/=5;
//x = x % 2;
//x%=2;
printf("%d", x);
return 0;
- Category
- Bro Code
- Tags
- assignment operator, assignment operators, assignment operators in c

Be the first to comment