Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Is c++ pass by reference or value?

1078


Do you know what are pure virtual functions?

1152


Will the following program execute?

1040


Is java made in c++?

1075


What is const pointer and const reference?

1170


How do I download c++?

1007


What is data type in c++?

1016


What is c++ good for?

1065


What is a v-table?

1185


What is meant by const_cast?

1130


Why do we use setw in c++?

1115


Write a program to find the reverse Fibonacci series starting from N.

1278


Differentiate between a pointer and a reference with respect to c++.

1249


Why c++ is faster than java?

1064


Why do we need c++?

1064