WRITE A PROGRAM to display address of variable using pointers
#include<stdio.h>
int main()
{
/* Declaration of normal & pointer variable */
float var, *ptr;
/* Setting some value to normal variable */
var = 16.25;
/* Pointer referencing */
ptr = &var;
/* Displaying value and address */
printf("Address of var without using pointer = %u\n", &var);
printf("Value of var = %f\n", *ptr);
printf("Address of var using pointer = %u\n", ptr);
return 0;
}
Output