+ 1
What is the meaning of compound operator '*=' in C? What function does it performs.
Ex. int i=2, a; a *= i; printf("%d", a) ;
7 Réponses
+ 3
Since, the value of a is not assigned depending upon the compiler its value can be set to either 0 or some garbage value. So the new value of a is value of ("a" assigned) *(i)
+ 2
With C you will get 16.
In Java it will be an error because 'a' don't have value.
+ 1
most likely multiply
+ 1
i *= 2;
is equal to
i = i * 2;
0
Ya. But what would be the output of my example code?
0
This means that a has been assigned the value 8?
0
Thank you