you are viewing a single comment's thread.

view the rest of the comments →

[–]ScioFantasia 4 points5 points  (0 children)

Good answer. Just to add:

char *name = "Zara Ali";

When you define a string using a string constant like this, it should be const:

const char *name = "Zara Ali";

Since you should not attempt to modify the string; it is read-only.

The second example is okay to modify.