Prepare for your Next Interview
This is a discussion on character array within the C and C++ forums, part of the Software Development category; what is the difference between char *a & char a[]?...
|
|||
|
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. |
| The Following 3 Users Say Thank You to jagatsastry For This Useful Post: | ||
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| convert one dimansional array to two dimansional array | Geek_Guest | C and C++ | 6 | 12-22-2007 04:17 AM |
| static array or dynamic array? | rpgubba | C and C++ | 6 | 12-22-2007 04:03 AM |
| Converting single character to string | Geek_Guest | Java | 2 | 08-24-2007 09:42 AM |
| HTML/PDF - Newline Character | psuresh1982 | AJAX & XML | 0 | 07-31-2007 05:37 AM |
| Buffered InputStream,Buffered Output Stream belongs to either character oriented or s | JobHelper | Java | 1 | 12-30-2006 07:08 AM |