ObjectiveMcq
Print Protected
This page is protected for print. Use the website to view the content.
What is the use of has_value() function in any container?
Correct Answer: B — Used to destroys the contained object in any variable
The type function is used to get information about the data stored in the any container variable. name() attribute is used to print the type id of the data. Now as the data stored in any variable is float therefore the program outputs f as f is the type id for float.