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 are the uses of null pointers?
How do you determine whether to use a stream function or a low-level function?
What is the heap?
What is malloc and calloc?
How do we print only part of a string in c?
What does == mean in texting?
Explain the difference between getch() and getche() in c?
write a c program to find the largest and 2nd largest numbers from the given n numbers without using arrays
Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]
Is malloc memset faster than calloc?
What is a floating point in c?
What's a good way to check for "close enough" floating-point equality?
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
What is the difference between strcpy() and memcpy() function in c programming?
c language interview questions & answer