Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
If you cant modify string literals, why arent they defined as being arrays of const characters?
If you cant modify string literals, why arent they defined as being arrays of const characters?
✍: Guest
One reason is that so very much code contains lines like
char *p = "Hello, world!";
which are not necessarily incorrect. These lines would suffer the diagnostic messages, but it's really any later attempt to modify what p points to which would be problems.
2016-01-06, 1270👍, 0💬
Popular Posts:
Should synchronization primitives be used on overrided bean methods? No. The EJB specification speci...
What is V model in testing? V model map’s the type of test to the stage of development in a project....
How To Give a User Read-Only Access to a Database? - MySQL FAQs - Managing User Accounts and Access ...
How To Write a Minimum Atom 1.0 Feed File? - RSS FAQs - Atom Feed Introduction and File Generation I...
How To Compare Two Strings with strcmp()? - PHP Script Tips - PHP Built-in Functions for Strings PHP...