Skip to content

Commit

Permalink
added pointer values
Browse files Browse the repository at this point in the history
  • Loading branch information
adithyaanilkumar committed Jun 29, 2020
1 parent 3a562ed commit f6b6f57
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions C/pointer_values.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//pointer values - example

#include<stdio.h>
void main()

{
char a;
int x;
float p, q;
a = 'A';
x = 125;
p = 10.25, q = 18.76;

printf("%c is stored at addr(in decimal) %u.\n", a, &a); //use %u-unsigned specifier
printf("%d is stored at addr %u.\n", x, &x);
printf("%f is stored at addr %u.\n", p, &p);
printf("%f is stored at addr %u.\n", q, &q);
}

0 comments on commit f6b6f57

Please sign in to comment.