int x=12 long y=x which casting type?
Answers
Answered by
2
Answer:
int y =(int)x ; What the second statement will do, it will typecast the x from float to integer value and the value of y will be 12 however there will be no change on the original x (it will remain 12). type casting
character
Explanation:
Typecasting is making a variable of one type, such as an int, act like another type, a char, for one single operation. To typecast something, simply put the type of variable you want the actual variable to act as inside parentheses in front of the actual variable.
Similar questions