Here you go,
PROGRAM
#include<stdio.h>
#include<stdlib.h>
int main()
{
short int a,b;
int c,d;
long int e,f;
short int size_short,size_int,size_long_int;
//printing address of variable using void pointer
printf("\\Address of first short int variable : %p", (void*)&a);
printf("\\Address of second short int variable : %p", (void*)&b);
printf("\\\\Address of first int variable : %p", (void*)&c);
printf("\\Address of second int variable : %p", (void*)&d);
printf("\\\\Address of first long int variable : %p", (void*)&e);
printf("\\Address of second long int variable : %p", (void*)&f);
//calculating size by subtracting memory address
size_short = (short int)((void*)&a - (void*)&b);
size_int = (short int)((void*)&c - (void*)&d);
size_long_int = (short int)((void*)&e - (void*)&f);
printf("\\\\size of short variable by subtracting address : %u", size_short);
printf("\\ size of short variable by using sizeof() : %u", sizeof(a));
printf("\\\\size of int variable by subtracting address : %u", size_int);
printf("\\ size of int variable by using sizeof() : %u", sizeof(c));
printf("\\\\size of long int variable by subtracting address : %u", size_long_int);
printf("\\ size of long variable by using sizeof() : %u", sizeof(e));
return 0;
}