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

int *p=20;
means
int *p;
p=20;
so the address of p is 20
printf("%d",p);
it prints 20 because now the base address of p is 20
even if we print as
printf("%u",p);
the o/p will be 20

Is This Answer Correct ?    9 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is define c?

568


What is a pointer value and address in c?

628


Is c still relevant?

635


What is a pointer on a pointer in c programming language?

616


What is void main ()?

605






What is the difference between text files and binary files?

670


Explain with the aid of an example why arrays of structures don’t provide an efficient representation when it comes to adding and deleting records internal to the array.

2653


How can I find the modification date and time of a file?

596


What is the difference between single charater constant and string constant?

615


Is there a way to have non-constant case labels (i.e. Ranges or arbitrary expressions)?

574


What should malloc(0) do? Return a null pointer or a pointer to 0 bytes?

583


What is a global variable in c?

586


What is a built-in function in C?

786


Explain how do you determine a file’s attributes?

588


Why doesnt that code work?

597