what is the difference between
const char *p, char const *p, const char* const p

Answer Posted / bhargav

Const char *P ->
declares a pointer through which you may be able to access
a char but you can not change it through the said pointer.
But the pointer itself can be changed.

char const *p ->
in this the value is constant

const char* const p ->
both address and value are constants

Is This Answer Correct ?    13 Yes 22 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the bubble sort algorithm.

642


Explain what are compound statements?

603


What is queue in c?

576


write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.

3500


What is the return type of sizeof?

590






Whats s or c mean?

593


Explain the difference between malloc() and calloc() function?

598


What is the use of typedef in structure in c?

542


What is a 'null pointer assignment' error?

724


What is the difference between far and near in c?

599


Explain why C language is procedural?

768


If jack lies on Mon, Tue Wed and jill lies on Thursday, Friday and Saturday. If both together tell they lied yesterday. So c the given options and then c cos in the given dates one will be saying the truth and one will be lying. I got Thursday as option because jack is saying the truth he lied yest but jill is lying again as he lies on that day.

1789


What is a structure and why it is used?

619


Explain low-order bytes.

623


What is the difference between break and continue?

604