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



hello everybody can we change a the adress of a variabl i mean can i put for exemple for a int *p..

Answer / 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

More C Interview Questions

Explain what is wrong in this statement?

0 Answers  


LOGIC OF Bodmas?

1 Answers  


What is the most efficient way to count the number of bits which are set in a value?

4 Answers  


What is 'makefile' in C langauage? How it be useful? How to write a makefile to a particular program?

2 Answers  


What is a wrapper function in c?

0 Answers  


List the difference between a While & Do While loops?

0 Answers   Accenture,


How are Structure passing and returning implemented by the complier?

0 Answers   TISL,


What is string in c language?

0 Answers  


How would you print out the data in a binary tree, level by level, starting at the top?

6 Answers   Amazon, Microsoft,


Write a program using bitwise operators to invert even bits of a given number.

2 Answers  


what is the hexidecimal number of 4100?

16 Answers   Google,


WAP &#8211; represent a char in binary format

4 Answers   Motorola, Wipro,


Categories