-
Junior Member
character array
what is the difference between char *a & char a[]?
-
Junior Member
Re: character array
char *a is a character type pointer variable while char a[] is a single dimensional dynamic character array
-
Junior Member
Re: character array
If what you meant is
what is the difference between char *a="abcd" & char a[]=-"abcd" ?
What Sahil Jain said applies here also. From usage point of view, the a in a[] is actually a constant pointer and any operations like a++ will generate a compilation error. a++ is perfectly legal for the first case.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules