what is cast operator?

Answer Posted / sathish, cognizant

Any unary expression is considered a cast expression.
The compiler treats cast-expression as type type-name after
a type cast has been made.
Casts can be used to convert objects of any scalar type to
or from any other scalar type.
Explicit type casts are constrained by the same rules that
determine the effects of implicit conversions.
Additional restraints on casts may result from the actual
sizes or representation of specific types.

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

c++ program to swap the objects of two different classes

1765


What is data binding in oops?

588


write a program to find 2 power of a 5digit number with out using big int and exponent ?

1895


write string class as your own class in java without using any built-in function

1976


What language is oop?

595






What is constructor in oop?

589


What are the benefits of polymorphism?

624


assume the program must insert 4 elements from the key board and then do the following programs.sequential search(search one of the elements),using insertion sort(sort the element) and using selection sort(sort the element).

1664


What is difference between multiple inheritance and multilevel inheritance?

603


why reinterpret cast is considered dangerous?

1903


What is the real life example of polymorphism?

607


Why do pointers exist?

659


What is abstraction and encapsulation?

574


What is this pointer in oop?

557


What is the significance of classes in oop?

590