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
Why main is used in c?
What is "Hungarian Notation"?
What is the Purpose of 'extern' keyword in a function declaration?
diff between exptected result and requirement?
What is operator promotion?
What does the function toupper() do?
PROGRAM TO WRITE CONTENTS OF 1 FILE IN REVERSE TO ANOTHER FILE,PROGRAM TO COPY 1 FILE TO ANOTHER BY SPECIFYING FILE NAMES AS COMMAND LINE
What's the best way of making my program efficient?
What is a structure and why it is used?
Is c high or low level?
What is difference between structure and union with example?
Does c have function or method?
7-Given an index k, return the kth row of the Pascal's triangle. For example, when k = 3, the row is [1,3,3,1]. For reference look at the following standard pascal’s triangle.
Is a pointer a kind of array?
What is pointer to pointer in c with example?