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

What is OOPS and How it is different from Procedural Programming ?

23 Answers   HP, Infosys, Thyrocare,


Write a C++ program to conduct an election of a mayor.Declare a class ELECTION With the following specification: Data member: Name 25 character Age Integer symbol 1 character Member functions: To accept data for 20 contestant To accept symbol as voting from 100 voters. To declare the winner and the loser.

1 Answers   Global Academy, Infotech,


What is the difference between C++ and java?

6 Answers   Atos Origin,


Generally, in all C++ programs, texts are in white colour. Can we change the colour of the text(either input or output or both)? If so, help me out.

1 Answers  


Write a program to multiply 3x3 matrics

1 Answers  






What is the difference between static polymorphism and dynamic polymorphism?

0 Answers  


Why and when is a virtual destructor needed?

5 Answers  


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

0 Answers   CAT,


What do you mean by pure virtual functions?

8 Answers  


What is abstraction oop?

0 Answers  


write a program to print * * * * * *

2 Answers  


how to tackle technical questions

1 Answers  


Categories