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
How do you redirect a standard stream?
Explain the use of 'auto' keyword
How many levels of indirection in pointers can you have in a single declaration?
What does the format %10.2 mean when included in a printf statement?
What is bubble sort in c?
What is binary tree in c?
What is the difference between formatted&unformatted i/o functions?
which of the following statement is wrong a) mes=123.56; b) con='T'*'A'; c) this='T'*20; d) 3+a=b;
What are the main characteristics of c language describe the structure of ac program?
How can I change the size of the dynamically allocated array?
explain what is fifo?
What is scanf_s in c?
what are the facialities provided by you after the selection of the student.
Write a program to print factorial of given number without using recursion?
Is it better to use a macro or a function?