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
What is the correct declaration of main?
How can I convert a number to a string?
Explain how to reverse singly link list.
What is a program flowchart and explain how does it help in writing a program?
can we have joblib in a proc ?
How can my program discover the complete pathname to the executable from which it was invoked?
What are the advantages of c preprocessor?
Why isn't any of this standardized in c? Any real program has to do some of these things.
What are file streams?
What will be the outcome of the following conditional statement if the value of variable s is 10?
write a program for the normal snake games find in most of the mobiles.
Explain the difference between null pointer and void pointer.
Write a program to print fibonacci series using recursion?
What does the file stdio.h contain?
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