Well... I've just started programming in C again. I've been away from this beautiful language for far too long! Anyway, thought I'd brush up on a few very basic concepts, but it seems I've made a small error. Anyway, why doesn't this return the appropriate sizes for the given data types?
Code:
#include <stdio.h>
int main(int argc, char *argv[])
{
int i;
char *types[] = {"int", "char", "long", "double", "long long", "char*" };
for(i=0;i<6;i++)
printf("A %s is: %d bytes in size!\n", types[i], sizeof(types[i]));
system("pause");
return 0;
}