Questions and Answers


  1. What is the Run-Time Type Information?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    With the help of RTTI, We can get the information about the data type at the runtime.


  1. Which is used to solve the memory management problem in c++?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    smart pointers



  1. What are the operators available in dynamic memory allocation?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    new and delete operators are mainly used to allocate and deallocate during runtime.


  1. What is meant by garbage collection?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    The garbage collection attempts to reclaim memory occupied by objects that are no longer in use by the program.



  1. What is the output of this program?
    #include <iostream>
    #include <string.h>
    using namespace std;
    int main()
    {
    try
    {
    char *ptr;
    strcpy(ptr, "Who are u?");
    }
    catch(const exception& excep)
    {
    }
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    As we are using a pointer value to copy a string, So it will be producing a runtime error.