Why c++ does not have finally?
Answer / Ashis Kumar
C++ does not have a 'finally' block as part of its exception handling mechanism. Instead, it uses RAII (Resource Acquisition Is Initialization) and destructors to ensure that resources are cleaned up properly when exceptions occur.
| Is This Answer Correct ? | 0 Yes | 0 No |
How a new element can be added or pushed in a stack?
Explain about Garbage Collector?
Given the following seqment of code containing a group of nested if instructions: y = 9; if ((x==3) || (x == 5)) y++; else if (x == 2) y *= 2; else if (x == 4 ) y-= 7; else y = 8; Enter a segment of code (without any IF statements) that does exectly the same thing using the switch structure.
Difference between delete and free.
Why isn't sizeof for a struct equal to the sum of sizeof of each member?
How to write a program such that it will delete itself after exectution?
What is polymorphism and its type in c++?
What is the difference between Char a[ ]=”string” and char *a=”String”
Explain the auto storage classes in c++.
What is public, protected, private in c++?
How can you find the nodes with repetetive data in a linked list?
What is the purpose of template?