Hi... just a quick one...
what would:
would this return statement return x squared or something different?Code:int somefunc(int x){ return x * x; }
Hi... just a quick one...
what would:
would this return statement return x squared or something different?Code:int somefunc(int x){ return x * x; }
Many junglists take pride in their belongin to what may be referred to as a globalised drum & bass subculture, as a subculture though, it is not nearly as distinct at gothic or punk!
Yes, it would return (x * x), which is the same as x squared. At least until it overflows the integer (which happens with numbers bigger than sqrt(INT_MAX), most machines that would be sqrt((2^31)-1) -> 46340). [^ here means to the power of, rather than XOR].
--
Mats