const char *

char * const

What is the differnce between the above two?

Answer Posted / karthik natarajan

const char * makes the data constant

char * constant makes the pointer constant

Is This Answer Correct ?    24 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What's the order in which the objects in an array are destructed?

867


What is the difference between passing by reference and passing a reference?

571


What is malloc in c++?

565


What is a local reference?

678


Can create new c++ operators?

583






What are the uses of typedef in a program?

620


How to declare a pointer to an array of integers?

653


Can a Structure contain a Pointer to itself?

617


Describe private, protected and public?

607


Explain about Virtual Function in C++?

620


A company pays its salespeople on a commission basis. The salespeople receive $200 per week plus 9 percent of their gross sales for that week. For example, a saleperson who sells $5000 worth of merchandise in a week receives $200 plus 9 percent of $5000, or a total of $650. You have been supplied with a list of items sold by each salesperson. The values of these items are as follows: Item Value A 239.99 B 129.75 C 99.95 D 350.89 Write a program that inputs one salesperson's items sold in a week (how many of item A? of item B? etc.) and calculates and displays that salesperson's earnings for that week.

3419


Why do we use the using declaration?

670


Explain Memory Allocation in C/C++ ?

643


How a pointer differs from a reference?

701


Which should be more useful: the protected and public virtuals?

606