s
BAN USER
Comments (7)
Reputation 20
Page:
1
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
Page:
1
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
String literals are stored in the read-only area of the data segment. So it makes no sense to make 2 different copies of the same string, as u cannot edit them anyway. Hence, these two pointers will point to the same location in memory.
- s August 19, 2012You can always assign different values to the pointers, but you cannot change the value.
e.g. you cannot do p[2]='a';