Questions and Answers
- What is the Run-Time Type Information?
-
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.
- Which is used to solve the memory management problem in c++?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
smart pointers
- What are the operators available in dynamic memory allocation?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
new and delete operators are mainly used to allocate and deallocate during runtime.
- What is meant by garbage collection?
-
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.
- 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)
{
}
}
-
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.