The answer is C, (c+w)%(int)a
A. The left side of the assignment number can only be variables, not expressions
B. The data for the modulo operation can only be integer type. (int)a forces a to be converted into an integer type, but b is a double-precision data type. The double-precision data type plus real type is a double-precision data type, and the divisor is a real number. rather than an integer, so the % operator cannot be used
C. The dividend is the addition of two integer numbers, the operation result is an integer, and the divisor is (int)a, which is also an integer, so the answer is C Correct
D and int type variables occupy less space in memory than double type variables, so the values ????of a and b cannot be assigned to w
Extended information:
< p>double (double-precision floating point type) is a data type used by computers. Compared with single-precision floating-point number (float), double (double-precision floating-point number) uses 64 bits (8 bytes) to store a floating-point number. ?It can represent 15 or 16 significant decimal digits, the negative value range is -1.7976E+308 to -4.94065645841246544E-324, and the positive value range is 4.94065645841246544E-324 to 1.797693 E+308.
Currently in ordinary computers, int occupies 4 bytes, 32 bits, and the data range is -2147483648~2147483647[-2^31~2^31-1]
long The keyword represents a long integer data, which is a basic data type in programming languages. It is the abbreviation of long int. The default is signed long integer, containing 4 bytes, and the value range is: -2^31 ~ (2^31 -1).
Reference materials:
Baidu Encyclopedia——double
Baidu Encyclopedia——int
Baidu Encyclopedia——long