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 / yogi

int *p=20;
This is like int *p;p=20;
printf("%d",p);It prints p properly as 20;
printf("%d",*p);It means deference the value at address 20,
which is invalid .

If we try to run,as address 20 is invalid and it tries to
fetch the value at address 20,signal 11 sent to that process
i.e it dumps core with segmentation fault

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the correct declaration of main?

1265


How can I convert a number to a string?

1254


Explain how to reverse singly link list.

1205


What is a program flowchart and explain how does it help in writing a program?

1362


can we have joblib in a proc ?

2387


How can my program discover the complete pathname to the executable from which it was invoked?

1121


What are the advantages of c preprocessor?

1318


Why isn't any of this standardized in c? Any real program has to do some of these things.

1266


What are file streams?

1068


What will be the outcome of the following conditional statement if the value of variable s is 10?

1373


write a program for the normal snake games find in most of the mobiles.

2309


Explain the difference between null pointer and void pointer.

1134


Write a program to print fibonacci series using recursion?

1135


What does the file stdio.h contain?

1119


Hai,I have done with my bachelor of commerce and planing to ms,please suggest me how to convince vo for shifting from commerce to computers. Visa on 8 DEC 2014  Npu university

2100