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
Why do we use main function?
What are logical errors and how does it differ from syntax errors?
hi any body pls give me company name interview conduct "c" language only
How do we declare variables in c?
What does static variable mean in c?
What should malloc(0) do?
What are global variables and explain how do you declare them?
Write a program to implement a round robin scheduler and calculate the average waiting time.Arrival time, burst time, time quantum, and no. of processes should be the inputs.
if (i = 0)printf ("True"); elseprintf("False"); Under what conditions will the above print out the string "True" a) Never b) Always c) When the value of i is 0 d) all of the above
How can you convert integers to binary or hexadecimal?
What is return type in c?
Why is extern used in c?
What is 1f in c?
How do I convert a string to all upper or lower case?
Why is it important to memset a variable, immediately after allocating memory to it ?