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 / 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 |
What is a pointer in c?
What is data types?
What is main function in c?
Why is a semicolon (;) put at the end of every program statement?
What are the different pointer models in c?
write a c program to print the next of a particular no without using the arithmetic operator or looping statements?
What is indirect recursion? give an example?
What 'lex' does?
What does typedef struct mean?
what is ram?
what is the difference b/w compiler and debugger?
How can you draw circles in C?