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


Please Help Members By Posting Answers For Below Questions

What are the uses of null pointers?

590


How do you determine whether to use a stream function or a low-level function?

649


What is the heap?

686


What is malloc and calloc?

575


How do we print only part of a string in c?

587






What does == mean in texting?

666


Explain the difference between getch() and getche() in c?

565


write a c program to find the largest and 2nd largest numbers from the given n numbers without using arrays

1785


Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]

632


Is malloc memset faster than calloc?

618


What is a floating point in c?

604


What's a good way to check for "close enough" floating-point equality?

628


Iam a B.Tech graduate and completed my engineering in 2009, from 2005 to 2009 and after that i had done nothing.Now i want to do job and get into BPO field . Friends give me suggestions as what to say in interview... if they ask me that what would you had done ... these many years without doing job ??????? pls urgent

1432


What is the difference between strcpy() and memcpy() function in c programming?

627


c language interview questions & answer

1463