Adobe Interview Question
Software Engineer / DevelopersSome of the disadvantages are:
1. you can change the value of the const variable.
2. private variable of a class can be changed.
The number of errors in a program are directly proportional to the number of pointers used in the program - Yahswant Kanitkar (Author of one of the best books -Pointers in C)
But on a more serious note, usage of un initialize pointers can cause an application to crash. I guess this is the single biggest disadvantage...
Above answers are not impressive at all, even though I reluctantly was to accept them as correct in the first place.
- Nix November 15, 2009Using pointers causes an additional level of indirection to access data. Makes access slow.
It is relatively harder to debug pointer arithmatic code and write access to data involving multiple pointers.
On a better side, it is impossible to write memory efficient programs without pointers.
Your thoughts below: