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

Explain #pragma statements.

593


Why is it important to memset a variable, immediately after allocating memory to it ?

1540


Explain how do you determine whether to use a stream function or a low-level function?

616


Explain what does the characters 'r' and 'w' mean when writing programs that will make use of files?

740


What does typeof return in c?

629






What are the basic data types associated with c?

803


Sir,please help me out with the code of this question. Write an interactive C program that will encode or decode multiple lines of text. Store the encoded text within a data file, so that it can be retrieved and decoded at any time. The program should include the following features: (a) Enter text from the keyboard, encode the text and store the encoded text in a data file. (b) Retrieve the encoded text and display it in its encoded form. (c) Retrieve the encoded text, decode it and then display the decoded text. (d) End the computation. Test the program using several lines of text of your choice.

1753


hi send me sample aptitude papers of cts?

1642


What is use of pointer?

575


What is the purpose of 'register' keyword in c language?

611


Design a program which assigns values to the array temperature. The program should then display the array with appropriate column and row headings.

1757


FILE PROGRAMMING

1767


A program is required to print your biographic information including: Names, gender, student Number, Cell Number, line of study and your residential address.

1241


What is the acronym for ansi?

618


What is #include stdlib h?

604