const char *
char * const
What is the differnce between the above tow?.

Answer Posted / kamaljit singh

in the first case it is pointer to a constant (i.e the
address can be changed ,where as the content/value in that
address cannot be changed).
In the later case it is a constant pointer (i.e the address
cannot be changed ,where as the content/value in that
address can be changed).

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why does this code crash?

614


What does & mean in scanf?

601


Can we declare variable anywhere in c?

533


Program to find the sum of digits of a given number until the sum becomes a single digit. (e.g. 12345=>1+2+3+4+5=15=>1+5=6)

685


Why enum is used in c?

524






How can I write a function that takes a format string and a variable number of arguments?

600


Is main an identifier in c?

595


What is #include stdio h?

679


What the advantages of using Unions?

669


Is anything faster than c?

581


what are non standard function in c

1431


How do you define a function?

579


Where register variables are stored in c?

546


Where are some collections of useful code fragments and examples?

712


What is the difference between int main and void main?

571