Programming Concepts Question:

Download Job Interview Questions and Answers PDF

Explain what are dangling pointers,virtual constructors and virtual destructors?

Programming Concepts Interview Question
Programming Concepts Interview Question

Answer:

char *str=new str;char *str1=new str1;strcpy(str,str1);delete str;at this time str will act as dangling pointer because when str1 is copied to str ,then it will create the deep copy,so when when we will delete that one then still thare is existing of its instance.That is called dangling pointer

Download Programming Concepts Interview Questions And Answers PDF

Previous QuestionNext Question
What is data modelling?Tell me what is the scope of Information Technology?