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
Does c have function or method?
State the difference between x3 and x[3].
What is the best way to store flag values in a program?
What is "Hungarian Notation"?
What is c basic?
How can I run c program?
Why should I prototype a function?
What is the g value paradox?
Explain indirection?
Write a program to print fibonacci series without using recursion?
Explain two-dimensional array.
Write a program to print “hello world” without using semicolon?
Explain setjmp()?
Compare interpreters and compilers.
What is methods in c?