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 are the advantages and disadvantages of c language?
how to find binary of number?
Why is C language being considered a middle level language?
Why we use break in c?
Differentiate between Macro and ordinary definition.
Draw a diagram showing how the operating system relates to users, application programs, and the computer hardware ?
What is the difference between exit() and _exit() function?
Is calloc better than malloc?
Write a program to replace n bits from the position p of the bit representation of an inputted character x with the one's complement. Method invertBit takes 3 parameters x as input character, p as position and n as the number of positions from p. Replace n bits from pth position in 8 bit character x. Then return the characters by inverting the bits.
What do you mean by recursion in c?
what is a function method?give example?
Function which gives a pointer to a binary trees const an integer value at each code, return function of all the nodes in binary tree.?
List some of the dynamic data structures in C?
How do I swap bytes?
What are linker error?