what is cast operator?

Answers were Sorted based on User's Feedback



what is cast operator?..

Answer / 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

what is cast operator?..

Answer / ramyagurrala

It provides a method for explicit conversion of the type of an object in a specific situation.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More OOPS Interview Questions

How to call a non virtual function in the derived class by using base class pointer

3 Answers   HCL,


What are the access specifiers avaible in c++?

4 Answers  


What is destructor give example?

0 Answers  


Give an example where we have to specifically use C programming language and C++ programming language cannot be used?

0 Answers   CAT,


What is the difference between abstraction and polymorphism?

0 Answers  


c++ provides classes...and classes do what we want but why then strcut are used...if we say data hiding... it is also provided by c++ in structs then why to prefer clasess

1 Answers   HCL, TCS,


What is oops concept with example?

0 Answers  


difference between static and non-static variables?

2 Answers  


What is operator overloading? Give Example

11 Answers   CTS, IBM, TCS,


Templates mean

0 Answers  


What is overriding in oops?

0 Answers  


What is polymorphism what are the different types of polymorphism?

0 Answers  


Categories