Casting Casting is an operation that allows us to change the type of a variable. In essence, we can take a variable of one type and cast it into an equivalent variable of another type. Casting can be useful for doing certain numerical and input/output operations. The syntax for casting an expression to a desired type is as follows: (type) exp Example:(int) (5.2*2)
đang được dịch, vui lòng đợi..