[ create a new paste ] login | about

Link: http://codepad.org/3QB6N21W    [ raw code | output | fork ]

godneil - C, pasted on Apr 2:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//Pointer and Memory Address

#include <stdio.h>

int main(void) {

int total = 5;
int *ptr;        //pointer

ptr = &total;    //memory address at total

printf("Total Value is : %d and  Memory Address is : %d", *ptr, ptr);

return 0;


}


Output:
1
Total Value is : 5 and  Memory Address is : -3947956


Create a new paste based on this one


Comments: