Programming for Problem Solving

GTU Practical 54

54. Write a program to print the address of a variable using a pointer.
#include<stdio.h>  ( this applies in the given code )

#include

int main(void)
{
int i=15;
int *p;
p=&i;
printf(“\n Address of Variable i = %u”,p);
return 0;
}

OUTPUT

Address of Variable i = 2705306036

GTU STUDY