Programming Concepts Question:
Download Job Interview Questions and Answers PDF
Explain what are dangling pointers,virtual constructors and virtual destructors?
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 Question | Next Question |
What is data modelling? | Tell me what is the scope of Information Technology? |