int *p=20;
if u print like dis printf("%d",p);
o\p:- 20; how is it possible?
plz give me the explanation.

Answer Posted / santhi perumal

We are assigning 20 to *p. Which means we are assigning the
address 20 to p. when you want to print the address of the
pointer variable we have to print just p not *p. if you want
to print the value stored in the particular address we need
to print like *p. in this case we are printing p so it will
give the address 20 to it.

Is This Answer Correct ?    31 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

If a variable is a pointer to a structure, then which operator is used to access data members of the structure through the pointer variable?

780


Explain how do you sort filenames in a directory?

608


Why do we use main function?

637


Why do we use int main instead of void main in c?

623


Difference between Function to pointer and pointer to function

634






What is a null string in c?

589


What do you mean by c?

589


List a few unconditional control statement in c.

561


Write a program of advanced Fibonacci series.

709


Where does the name "C" come from, anyway?

645


Why are algorithms important in c program?

622


What are called c variables?

574


Explain how can you avoid including a header more than once?

603


What is the use of header files?

606


What are the types of pointers in c?

530