What is cast operator? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What is cast operator?

cast operator

30th Nov 2016, 5:40 PM
Ram Naresh Arya
Ram Naresh Arya - avatar
2 Answers
+ 1
A cast is a special operator that forces one data type to be converted into another. As an operator, a cast is unary and has the same precedence as any other unary operator
30th Nov 2016, 6:33 PM
Sonu Baghel
Sonu Baghel - avatar
0
Basically the cast operatorĀ is used toĀ convertĀ numeric values from one numeric type to another or to change an object reference to a compatible type.
27th Apr 2017, 3:37 PM
Nikhil
Nikhil - avatar