summaryrefslogtreecommitdiff
path: root/pointer.c
blob: 48c93ca074d4f35960c3a2be454f8d84ece589e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* Use a pointer to assign the adderss of a variable */

#include <stdio.h>

int main() 
{
    int i, *p;
    i=10;
    p=&i;
    printf("The value of i is %d\n",i);
    printf("The address of i is %p\n", &i);
    char c = 'a';
    printf("Char: %c\n",c);
    return 0;
    
}