Write a program to print the address of a variables
#include<stdio.h> #include<conio.h> void display(int,int); int main() { int a,b; printf("Address of a = %u\n Address of b = %u\n",&a,&b); display(a,b); getch(); return 0; } void display(int a, int b) { printf("Address of a = %u\n Address of b = %u\n",&a,&b); }
Output
Address of a = 6422300
Address of b = 6422296
Address of a = 6422272
Address of b = 6422276