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

What is function in c with example?

0 Answers  


how to find anagram without using string functions using only loops in c programming

0 Answers  


My teacher ask to make a program that can: Insert record in front Insert record at the end Insert in between Search node record Delete record in front Delete record at the end Delete record in between Using Data structure Linked List type. But I'm really confused about the codes and I can't go through. Please help Thanks in advance. Also here is my unfinished code if someone can make changes it will be more good.

1 Answers  


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

0 Answers  


How can a program be made to print the line number where an error occurs?

0 Answers  


Can you mix old-style and new-style function syntax?

0 Answers  


What is the difference between void main() and void main (void) give example programme?

0 Answers  


How many data structures are there in c?

0 Answers  


What is a good data structure to use for storing lines of text?

0 Answers  


Draw a diagram showing how the operating system relates to users, application programs, and the computer hardware ?

0 Answers  


what is the differance between pass by reference and pass by value.

7 Answers   Infosys,


What are header files and what are its uses in C programming?

0 Answers  


Categories