#include <stdio.h>
int main (void) {
int *a = (int *) 60;
int *b = (int *) 40;
printf("%lu\n", (a-b));
printf("Integer Size = %lu\n", sizeof (int));
printf("Pointer Size = %lu\n\n", sizeof (int *));
char *c = (char *) 60;
char *d = (char *) 40;
printf("%lu\n", (c-d));
printf("Character Size = %lu\n", sizeof (char));
printf("Pointer Size = %lu\n", sizeof (char *));
return 0;
}
OUTPUT:
5
Integer Size = 4
Pointer Size = 8
20
Character Size = 1
Pointer Size = 8
Please explain the output. What i am not able to understand is what int *a = (int *) 60; does ?
60.lwith"%lu\n", (a-b)?printf("%td\n", (a - b));