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...

wats the diference btwen constant pointer and pointer to a
constant.pls give examples.

Answer Posted / rudra prasad panda

Pointer is a variable containing the addres of another
variable;
Constant pointer is a variable which points to a variable
constantly.it means that , once it is initialised,it cannot
be changed.Till the end of program,it points to that
variable only;
EXAMPLE:
char k,m;
const char *p=&k;
p=&m;//(syntax error)

********
A pointer to a constant is a pointer such that the contents
of the variable(pointed by the pointer)cannot be modified
throuhg the pointer;
EXAMPLE:
char m='l';
char * const p;
p=&m;
*p='u';//syntax error
m='k';//no syntax error

Is This Answer Correct ?    8 Yes 42 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

a character or group of characters that defines a register,or a part of storage a) memory b) byte c) address d) linear list

967


Write a C++ program to generate 10 integer numbers between - 1000 and 1000, then store the summation of the odd positive numbers in variable call it sum_pos, then find the maximum digit in this variable regardless of its digits length.

1950


Where does the name "C" come from, anyway?

1081


What are the different types of linkage exist in c?

976


What is const and volatile in c?

992


How can you find out how much memory is available?

1015


List some basic data types in c?

976


which type of aspect you want from the student.

2117


Explain which of the following operators is incorrect and why? ( >=, <=, <>, ==)

979


Can you return null in c?

1095


What is extern storage class in c?

946


Where is c used?

1036


What is the scope of global variable in c?

957


What is adt in c programming?

1106


Explain setjmp()?

1011