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

Differentiate between declaring a variable and defining a variable?

1022


How can I call system when parameters (filenames, etc.) Of the executed command arent known until run time?

1094


How do you convert strings to numbers in C?

1213


What is the difference between scanf and fscanf?

1248


What does void main () mean?

1220


In a byte, what is the maximum decimal number that you can accommodate?

1123


What are the features of c languages?

1081


What is && in c programming?

1157


How do you convert a decimal number to its hexa-decimal equivalent.Give a C code to do the same

1086


what are the different storage classes in c?

1172


What is abstract data structure in c?

1022


What is stack in c?

1061


What is getch () for?

1201


What's a good way to check for "close enough" floating-point equality?

1146


Explain can the sizeof operator be used to tell the size of an array passed to a function?

1058