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 are different types of operators?
Explain how can I write functions that take a variable number of arguments?
How can I avoid the abort, retry, fail messages?
What is the translation phases used in c language?
a number whose only prime factors are 2,3,5, and 7 is call humble number,,write a program to find and display the nth element in this sequence.. sample input : 2,3,4,11,12,13, and 100.. sample output : the 2nd humble number is 2,the 3rd humble number is 3,the 4th humble number is ,the 11th humble number is 12, the 12th humble number is 14, the 13th humble number is 15, the 100th humble number is 450.
what is diffrence between linear and binary search in array respect to operators?what kind of operator can be used in both seach methods?
What should malloc() do? Return a null pointer or a pointer to 0 bytes?
Write a program to generate the first n terms in the series --- 2,3,5,7,11,...,17
When should a type cast be used?
write a program that types this pattern: 12345678987654321 12345678 87654321 1234567 7654321 123456 654321 12345 54321 1234 4321 123 321 12 21 1 1
Write a program of prime number using recursion.
write a program to display the numbers in the following 4 4 3 3 2 2 1 1 0 1 1 2 2 3 3 4 4