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...

Which of the Standard C++ casts can be used to perform a
?safe? downcast:
a) reinterpret_cast
b) dynamic_cast
c) static_cast
d) const_cast

Answer Posted / santosh mundhe

reinterpret_cast: Reinterpret_cast is only way to cast
between pointers and value type.

dynamic_cast:Dynamic_cast is used with pointers and
reference.It's purpose is - it provid valid object
conversion of requested class.

static_cast:Static_cast provides conversion from pointer to
related class not only from derived to base class.

const_cast:It manipulets constness of an object while
passing a const object to a function.

:-dynamic_cast performs a special checking during runtime.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is c++ map a hash table?

976


Which is most difficult programming language?

1032


List the special characteristics of constructor.

1127


What is binary object model?

969


What is lvalue?

1132


How a new element can be added or pushed in a stack?

963


Assume an array of structure is in order by studentID field of the record, where student IDs go from 101 to 500. Write the most efficient pseudocode algorithm you can to find the record with a specific studentID if every single student ID from 101 to 500 is used and the array has 400 elements. Write the most efficient pseudocode algorithm you can to find a record with a studentID near the end of the IDs, say in the range from 450 to 500, if not every single student ID in the range of 101 to 500 is used and the array size is only 300

2173


How is objective c different from c++?

1196


How to declare a function pointer?

956


Write a C++ Program to check whether a number is prime number or not?

1067


What are the types of pointer?

1039


Explain the pure virtual functions?

1057


Give example of a pure virtual function in c++?

1088


Why is swift so fast?

1059


What is a c++ vector?

990