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 is the role you expect in software industry?
a) Identify the following declarations. Ex. int i (integer variable) float a[l0](array of 10 real nos) int (*f())() void *f int (*f()) [] void *f int f[] [] [] char *(*f) () int (*f[]) [] float(*f) [] [] float **f int ******f
a value that does not change during program execution a) variabe b) argument c) parameter d) none
Is main an identifier in c?
#define MAX(x,y) (x) >(y)?(x):(y) main() { inti=10,j=5,k=0; k= MAX(i++,++j); printf("%d..%d..%d",i,j,k); }
Why we use stdio h in c?
Explain how do you determine whether to use a stream function or a low-level function?
Is multithreading possible in c?
What is volatile variable how do you declare it?
What is the symbol indicated the c-preprocessor?
What are actual arguments?
Explain what is a stream?
How can I display a percentage-done indication that updates itself in place, or show one of those twirling baton progress indicators?
What is the difference between text and binary i/o?
Explain what is #line used for?