const char *

char * const

What is the differnce between the above two?

Answer Posted / vidushi

Both are the method to declare a character pointer. but char
*const means pointer is sticked to accept a single address
but in case of const char * means u can assign it to
different variable address to it.

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is purpose of new operator?

601


What is the difference between an array and a list?

595


Why should we use null or zero in a program?

610


What is constructor and destructor in c++?

627


Tell me can a pure virtual function have an implementation?

562






Differentiate between structure and class in c++.

607


Which function cannot be overloaded c++?

588


Explain selection sorting. Also write an example.

590


What is bubble sort c++?

583


Can a program run without main in c++?

593


What programming language should I learn first?

600


Are strings immutable in c++?

666


Write a Program for read a line from file from location N1 to N2 using command line arguments. Eg:exe 10 20 a.c

809


What are the benefits of c++?

578


What is anonymous object in c++?

636