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 non-const string.3:The 
pointer *p* can be modified to point to another string, whereas the 
individual characters within array *a* can be changed.4:In both cases the *
'\0'* will be added at the end of the string "Sanjay".

-- 
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/-/7CewyURYV1AJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to