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

Why main is used in c?

575


What is "Hungarian Notation"?

627


What is the Purpose of 'extern' keyword in a function declaration?

635


diff between exptected result and requirement?

1588


What is operator promotion?

615






What does the function toupper() do?

643


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

1454


What's the best way of making my program efficient?

613


What is a structure and why it is used?

604


Is c high or low level?

567


What is difference between structure and union with example?

579


Does c have function or method?

575


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.

2206


Is a pointer a kind of array?

585


What is pointer to pointer in c with example?

540