wen u pass an array as parameter to a func, it does decay to a pointer, nd compiler doesn't stop u to change contents of the array through this pointer. basically u can change or not the value at some memory location depends on how u have allocated it not how u r accessing it.
On Sun, Aug 28, 2011 at 7:47 AM, rohit <raman.u...@gmail.com> wrote: > Thanks for your reply himanshu, ...I am aware of the above stated fact but > my doubt is that when i pass this char array to a function and accept it as > a char pointer (char *a), and then when write a[0] = 'a', why don't i get an > error? > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/algogeeks/-/uoEq0N1M1t0J. > > To post to this group, send email to algogeeks@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.