Strings are const char arrys, they are readonly, cannot be modified
eg:
char *a="hello";
*a='b'; --> Causes runtime errors
Arrays are allocated in user data area and can be modified.
eg:
char a[]="hello";
*a='b';
cout<-->prints bello.
Sunday, January 28, 2007
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment