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

correct ans is
int *p ; // creating a pointer of integer type
*p=20; // we are creating memory for 20 and p is pointing to
it .
printf("%d",p); // prints p 's address

printf("%d",*p); // prints value pointed by p . i.e 20

wrong declarations
we
ERRORS 1.int *p=20;

Is This Answer Correct ?    4 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create.

1686


What is the size of array float a(10)?

878


Can a function be forced to be inline? Also, give a comparison between inline function and the C macro?

857


why arguments can generally be passed to functions a) sending the values of the arguments b) sending the addresses of the arguments c) a & b d) none of the above

863


Explain the difference between structs and unions in c?

747


application areas a 'c' a) operating system b) graphics, interpreter, assembler c) program evalution, communication softwares d) all the above

813


Why c is called top down?

825


Why void is used in c?

756


7-Given an index k, return the kth row of the Pascal's triangle. For example, when k = 3, the row is [1,3,3,1]. For reference look at the following standard pascal’s triangle.

2450


What does c mean in basketball?

738


Who developed c language and when?

803


What does #pragma once mean?

892


What is the explanation for the dangling pointer in c?

874


What is null pointer constant?

767


What is call by value in c?

729