Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Can you tell me how to check whether a linked list is circular?

1408


How to establish connection with oracle database software from c language?

2201


Difference between Shallow copy and Deep copy?

2019


How are variables declared in c?

1098


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)

1152


Dont ansi function prototypes render lint obsolete?

1125


What is character set?

1168


Explain is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?

1218


How will you delete a node in DLL?

1289


Can a pointer point to null?

1065


In C language, the variables NAME, name, and Name are all the same. TRUE or FALSE?

1230


What is a ternary operator in c?

1120


What is getch?

1186


Explain high-order bytes.

1118


What are register variables in c?

1012