Why the usage of pointers in C++ is not recommended ?
Answer / Shah Alam
The misuse of pointers can lead to undefined behavior, memory leaks, and security vulnerabilities. Improper handling of pointers can result in dangling pointers, segmentation faults, or buffer overflows. However, with proper understanding and careful programming practices, pointers remain a powerful tool for managing dynamic memory.
| Is This Answer Correct ? | 0 Yes | 0 No |
Differentiate between a deep copy and a shallow copy?
What is the difference between a constructor and a destructor in C++?
What are the advantages of inheritance in c++?
Why is c++ is better than c?
What is stream and its types in c++?
What is the difference between method and message?
What you know about structures in C++?
1 Answers Agilent, ZS Associates,
What will happen if I allocate memory using "new" and free it using "free" or allocate sing "calloc" and free it using "delete"?
Enter n no. of element and delete value from desire position
What is searching? Explain linear and binary search.
In which memory a class gets stored(in heap /in stack)? And why??
Are c and c++ similar?