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 |
. Consider the following program main() { int a[5]={1,3,6,7,0}; int *b; b=&a[2]; } The value of b[-1] is (A) 1 (B) 3 (C) -6 (D) none
What is the most efficient way to count the number of bits which are set in an integer?
Place the #include statement must be written in the program?
what is the difference between #include<stdio.h> and #include "stdio.h" ?
what is y value of the code if input x=10 y=5; if (x==10) else if(x==9) elae y=8; a.9 b.8 c.6 d.7
What are the primitive data types in c?
code for reverse alternate words from astring
How is a macro different from a function?
main() { struct test { char c; int i; char m; } t1; printf("%d %d\n", sizeof(t1), sizeof(t1.c)); }
1 Answers Vector, Vector India,
difference of two no's with out using - operator
What is the meaning of && in c?
Explain the properties of union.