Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 do we use main function?

1183


What are logical errors and how does it differ from syntax errors?

1303


hi any body pls give me company name interview conduct "c" language only

2287


How do we declare variables in c?

1070


What does static variable mean in c?

1111


What should malloc(0) do?

1125


What are global variables and explain how do you declare them?

1108


Write a program to implement a round robin scheduler and calculate the average waiting time.Arrival time, burst time, time quantum, and no. of processes should be the inputs.

1109


if (i = 0)printf ("True"); elseprintf("False"); Under what conditions will the above print out the string "True" a) Never b) Always c) When the value of i is 0 d) all of the above

1164


How can you convert integers to binary or hexadecimal?

1037


What is return type in c?

1140


Why is extern used in c?

1093


What is 1f in c?

2664


How do I convert a string to all upper or lower case?

1125


Why is it important to memset a variable, immediately after allocating memory to it ?

2077