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


Please Help Members By Posting Answers For Below Questions

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

1432


How is a macro different from a function?

661


Write a code to achieve inter processor communication (mutual exclusion implementation pseudo code)?

693


What is the difference between single charater constant and string constant?

629


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

619






Can you explain the four storage classes in C?

646


What could possibly be the problem if a valid function name such as tolower() is being reported by the C compiler as undefined?

751


Can a function be forced to be inline? Also, give a comparison between inline function and the C macro?

662


Is it better to use a macro or a function?

659


List the different types of c tokens?

631


Write the syntax and purpose of a switch statement in C.

631


Process by which one bit pattern in to another by bit wise operation is?

617


What is meant by keywords in c?

622


Explain how can a program be made to print the line number where an error occurs?

700


What is difference between union and structure in c?

584