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
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?
Explain how do you sort filenames in a directory?
Why do we use main function?
Why do we use int main instead of void main in c?
Difference between Function to pointer and pointer to function
What is a null string in c?
What do you mean by c?
List a few unconditional control statement in c.
Write a program of advanced Fibonacci series.
Where does the name "C" come from, anyway?
Why are algorithms important in c program?
What are called c variables?
Explain how can you avoid including a header more than once?
What is the use of header files?
What are the types of pointers in c?