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 that continue statement??

4 Answers  


which one low Priority in c? a)=,b)++,c)==,d)+

10 Answers  


int x=sizeof(!5.856); What will value of variable x?

2 Answers  


write a prgram of swapping with 2 valiables

6 Answers  


write a programme to convert temperature from farenheit to celcius?

4 Answers   IBM,






Why is #define used?

0 Answers  


What is meant by recursion?

0 Answers   ADP,


What Is The Difference Between Null And Void Pointer?

0 Answers   TCS,


If an old women's age is the same as her three grand daughters i,mean the number of days old child=the no of weeks old child=no of months old child .The total yrs of all these ppl is 114 yrs...then how old is the old woman? the yr has 365 days..and 30 days each month.

1 Answers   TCS,


Here is alphabets : abcdefgh 1) how to reverse. as hgfedcba 2) after reversal, how to group them in a pair hg fe dc ba.

2 Answers  


Describe explain how arrays can be passed to a user defined function

0 Answers  


What is console in c language?

0 Answers  


Categories