Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

what is the difference between char * const and const char
*?

Answer Posted / brindha

Char* const p -> Here pointer P is a const pointer, which
means that this pointer can point to only one memory
location. eg. char* const p = &arr;
p++ ; -> This is invalid


const char* p -> this indicates that the data pointed by
the pointer p is constant & the value in that address
cannot be modified. eg. const char* p = 'a';
*p = 'b'; -> This is invalid

Is This Answer Correct ?    30 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is meant by errors and debugging?

233


What is malloc return c?

183


What is #include in c?

178


Why c is called a middle level language?

246


What would happen to X in this expression: X += 15; (assuming the value of X is 5)

248






How many levels of pointers have?

207


i want to switch my career from quailty assurance engineering to development kindly guide me from which programming language its better for me to start plz refer some courses or certifications too i have an experience of 1.5 yrs in QA field.Kindly guide me

1098


Explain how can I open a file so that other programs can update it at the same time?

200


How many loops are there in c?

188


Mention four important string handling functions in c languages .

220


What is the difference between malloc() and calloc()?

197


What is unsigned int in c?

175


Is c easier than java?

167


i want to know the procedure of qualcomm for getting a job through offcampus

1531


Where does the name "C" come from, anyway?

230