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
Iam a B.Tech graduate and completed my engineering in 2009, from 2005 to 2009 and after that i had done nothing.Now i want to do job and get into BPO field . Friends give me suggestions as what to say in interview... if they ask me that what would you had done ... these many years without doing job ??????? pls urgent
How is a macro different from a function?
Write a code to achieve inter processor communication (mutual exclusion implementation pseudo code)?
What is the difference between single charater constant and string constant?
c language supports bitwise operations, why a) 'c' language is system oriented b) 'c' language is problem oriented c) 'c' language is middle level language d) all the above
Can you explain the four storage classes in C?
What could possibly be the problem if a valid function name such as tolower() is being reported by the C compiler as undefined?
Can a function be forced to be inline? Also, give a comparison between inline function and the C macro?
Is it better to use a macro or a function?
List the different types of c tokens?
Write the syntax and purpose of a switch statement in C.
Process by which one bit pattern in to another by bit wise operation is?
What is meant by keywords in c?
Explain how can a program be made to print the line number where an error occurs?
What is difference between union and structure in c?