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
what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;
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
Differentiate between the expression “++a” and “a++”?
What is the difference between int main and void main?
What does %p mean?
explain what are pointers?
Apart from dennis ritchie who the other person who contributed in design of c language.
What is the difference between the = symbol and == symbol?
What would be an example of a structure analogous to structure c?
What does the function toupper() do?
Linked lists -- can you tell me how to check whether a linked list is circular?
What header files do I need in order to define the standard library functions I use?
What is #define in c?
Explain what does a function declared as pascal do differently?
In C programming, what command or code can be used to determine if a number of odd or even?