my doubt is :
how can we assign a string constant to a pointer.And when we assign like this is a character array with the name b[] is initialised to "abc"?
The pointer is assigned the address of an unnamed array which contains the string literal.
and can anyone expalin this program:
the out put was :
415
419
98
97
Well, first of all the behavior is undefined so what you see does not necessarily mean anything. At best you might be seeing the address of a string literal presented as an integer for the first two. The second two merely show that your system uses ASCII for characters.
Reputation Points: 2780
Solved Threads: 312
long time no c
Offline 4,790 posts
since Apr 2004