How many types of casting are there in C++?
When is a dynamic cast,static_cast,reinterpret cast used?
Answer Posted / berzerk
Casting Operators
There are several casting operators specific to the C++ language. These operators are intended to remove some of the ambiguity and danger inherent in old style C language casts. These operators are:
dynamic_cast Used for conversion of polymorphic types.
static_cast Used for conversion of nonpolymorphic types.
const_cast Used to remove the const, volatile, and __unaligned attributes.
reinterpret_cast Used for simple reinterpretation of bits.
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
Can I uninstall microsoft c++ redistributable?
How does code-bloating occur in c++?
What is scope in c++ with example?
what are the characteristics of Class Members in C++?
What is the best c++ book?
How would you obtain segment and offset addresses from a far address of a memory location?
Define a pdb file.
What you know about structures in C++?
What is c++ virtual inheritance?
What are the advantages of c++ over c?
total amount of milk produced each morning and then calculates and outputs the number of cartons needed for this milk , the cost of producing the milk and the profit from producing this milk.
Why do we use using namespace std in c++?
What is the difference between the functions memmove() and memcpy()?
Is c++ free?
Evaulate: 22%5 a) 2 b) 4 c) 0