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 / santhi perumal

We are assigning 20 to *p. Which means we are assigning the
address 20 to p. when you want to print the address of the
pointer variable we have to print just p not *p. if you want
to print the value stored in the particular address we need
to print like *p. in this case we are printing p so it will
give the address 20 to it.

Is This Answer Correct ?    31 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is c still used?

782


Is main an identifier in c?

825


Are comments included during the compilation stage and placed in the EXE file as well?

859


which is conditional construct a) if statement b) switch statement c) while/for d) goto

966


A global variable when referred to in another file is declared as this a) local variable b) external variable c) constant d) pointers

844


How is a null pointer different from a dangling pointer?

763


what is the differnce between programing langauge and tool? is sas is a programing langauge r tool?

2086


A function can make the value of a variable available to another by a) declaring the variable as global variable b) Passing the variable as a parameter to the second function c) Either of the two methods in (A) and (B) d) binary stream

901


What is cohesion in c?

722


What is an auto keyword in c?

846


What are directives in c?

726


What is strcmp in c?

743


1) write a program to generate 1st n fibonacci prime numbers using Nested if 2) write a program to generate twin prime numbers from m to n using nested if 3) write a program to check whether a given integer is a strong number or not using nested if 4) Write a program to generate prime factors of a given integer using nested if 5)write a program to generate prime numbers from m to n using nested if 6)write a program to generate perfect numbers from m to n using nested if 7)write a program to generate the pallindromes from m to n using neste if 8)write a program to generate armstrong numbers from m to n using nested if 9)write a program to generate strong numbers from m to n using nested if

4178


Can a pointer be volatile in c?

713


What is the heap?

939