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
What number of digits that can be accuratly stored in a float (based on the IEEE Standard 754)? a) 6 b) 38 c) An unlimited number
Explain the use of vtable.
What is polymorphism & list its types in c++?
Which operator cannot overload?
What is a syntax in c++?
Describe the advantage of an external iterator.
Where Malloc(), Calloc(), and realloc() does get memory?
What are the uses of typedef in a program?
What are pointer-to-members? Explain.
Write some differences between an external iterator and an internal iterator? Describe the advantage of an external iterator.
Why is c++ difficult?
What is buffer and example?
Explain one method to process an entire string as one unit?
How can you differentiate between inheritance and implementation in c++?
What is a vector c++?