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

hello everybody
can we change a the adress of a variabl i mean can i put for
exemple for a int *p:
&p=6
?????????

Answer Posted / letskools

No,We cannot change the address of memory of a variable
because the addresses to the variable are provided by the
OS. We can only assign this address to the pointer variable
like this:
int x,*p;
P=&x;
We can change variable value through pointer like this:
*p=4;
but we can't change the variable address through the pointer
and also we can't provide any address to the pointer
variable directly as an "numeric constant" so this statement
is incorrect:
&p=6;

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;

2442


cin.ignore(80, _ _);This statement a) ignores all input b) ignores the first 80 characters in the input c) ignores all input till end-of-line d) iteration

1110


Differentiate between the expression “++a” and “a++”?

1255


What is the difference between int main and void main?

1051


What does %p mean?

1089


explain what are pointers?

1021


Apart from dennis ritchie who the other person who contributed in design of c language.

1406


What is the difference between the = symbol and == symbol?

1125


What would be an example of a structure analogous to structure c?

1001


What does the function toupper() do?

1136


Linked lists -- can you tell me how to check whether a linked list is circular?

1094


What header files do I need in order to define the standard library functions I use?

1063


What is #define in c?

1048


Explain what does a function declared as pascal do differently?

1299


In C programming, what command or code can be used to determine if a number of odd or even?

1060