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
Differentiate between declaring a variable and defining a variable?
How can I call system when parameters (filenames, etc.) Of the executed command arent known until run time?
How do you convert strings to numbers in C?
What is the difference between scanf and fscanf?
What does void main () mean?
In a byte, what is the maximum decimal number that you can accommodate?
What are the features of c languages?
What is && in c programming?
How do you convert a decimal number to its hexa-decimal equivalent.Give a C code to do the same
what are the different storage classes in c?
What is abstract data structure in c?
What is stack in c?
What is getch () for?
What's a good way to check for "close enough" floating-point equality?
Explain can the sizeof operator be used to tell the size of an array passed to a function?