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 / vignesh1988i
ya,, i think..
first we have declared an pointer variable *p and
assigned a value 20.... but we know that pointers are those
which can hold only the address of another variable..... so
surely in the memory P it wont have 20... so 20 will be
stored in some other unbknown variable in the memory which
wont be visible to user in thesr cases...... that unknown
memory address will be getting stored in this pointer
variable.... so when we give only p or *p it will print 20
and not the address of the unknown location containing
20........... because it will be directly accessible
Is This Answer Correct ? | 7 Yes | 10 No |
Post New Answer View All Answers
What does a derived class inherit from a base class a) Only the Public members of the base class b) Only the Protected members of the base class c) Both the Public and the Protected members of the base class d) .c file
What is strcpy() function?
What is the difference between class and object in c?
Explain how can you avoid including a header more than once?
Explain modulus operator.
Tell me when would you use a pointer to a function?
What is malloc calloc and realloc in c?
There is a practice in coding to keep some code blocks in comment symbols than delete it when debugging. How this affect when debugging?
Tell me is null always defined as 0(zero)?
c program for searching a student details among 10 student details
What is scope rule of function in c?
In a switch statement, what will happen if a break statement is omitted?
What are the 4 types of unions?
Why c is a mother language?
What is a constant?