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 / saikishore
correct ans is
int *p ; // creating a pointer of integer type
*p=20; // we are creating memory for 20 and p is pointing to
it .
printf("%d",p); // prints p 's address
printf("%d",*p); // prints value pointed by p . i.e 20
wrong declarations
we
ERRORS 1.int *p=20;
| Is This Answer Correct ? | 4 Yes | 3 No |
Post New Answer View All Answers
What is strcmp in c?
What library is sizeof in c?
Do you know null pointer?
How does selection sort work in c?
Explain argument and its types.
What is the difference between the local variable and global variable in c?
What is sizeof c?
the process of defining something in terms of itself is called (or) in C it is possible for the functions to call themselves. A function called a) nested function b) void function c) recursive function d) indifinite function
When should we use pointers in a c program?
Where local variables are stored in c?
Is it valid to address one element beyond the end of an array?
Is python a c language?
Differentiate between declaring a variable and defining a variable?
Why is #define used?
Is c programming hard?