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

What is memcpy() function?

617


Explain the ternary tree?

597


Explain the use of function toupper() with and example code?

651


What is meant by high-order and low-order bytes?

650


What are the functions to open and close the file in c language?

589






What is a good way to implement complex numbers in c?

589


What is formal argument?

644


What's the total generic pointer type?

608


What are the valid places to have keyword “break”?

647


What is time null in c?

579


What is data type long in c?

621


why to assign a pointer to null sometimes??how can a pointer we declare get assigned with a garbage value by default???

1511


What does %p mean c?

623


How many levels of pointers can you have?

695


What is fflush() function?

642