[algogeeks] String Doubt

2011-08-13 Thread Raman
Which of the following statements are correct about the below declarations? *char *p = Sanjay; char a[] = Sanjay;*1:There is no difference in the declarations and both serve the same purpose.2:*p* is a non-const pointer pointing to a non-const string, whereas *a* is a const pointer pointing to a

Re: [algogeeks] String Doubt

2011-08-13 Thread Rohit Srivastava
2. On Sat, Aug 13, 2011 at 7:24 PM, Raman raman.u...@gmail.com wrote: Which of the following statements are correct about the below declarations? *char *p = Sanjay; char a[] = Sanjay;*1:There is no difference in the declarations and both serve the same purpose.2:*p* is a non-const pointer

Re: [algogeeks] String Doubt

2011-08-13 Thread Rohit Srivastava
also 3,4 On Sat, Aug 13, 2011 at 7:30 PM, Rohit Srivastava access2ro...@gmail.comwrote: 2. On Sat, Aug 13, 2011 at 7:24 PM, Raman raman.u...@gmail.com wrote: Which of the following statements are correct about the below declarations? *char *p = Sanjay; char a[] = Sanjay;* 1: There is no

Re: [algogeeks] String Doubt

2011-08-13 Thread Raman
In statement 2, isn't p pointing to const string, as we cannot modify the characters of the string. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To view this discussion on the web visit

Re: [algogeeks] String Doubt

2011-08-13 Thread rajeev bharshetty
3,4 On Sat, Aug 13, 2011 at 7:39 PM, Raman raman.u...@gmail.com wrote: In statement 2, isn't p pointing to const string, as we cannot modify the characters of the string. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To view this

Re: [algogeeks] String Doubt

2011-08-13 Thread Rohit Srivastava
my bad only 3,4 On Sat, Aug 13, 2011 at 7:41 PM, rajeev bharshetty rajeevr...@gmail.comwrote: 3,4 On Sat, Aug 13, 2011 at 7:39 PM, Raman raman.u...@gmail.com wrote: In statement 2, isn't p pointing to const string, as we cannot modify the characters of the string. -- You received this