I did the following experiment to know the size of long int and int in my system
System spec: 64 bit windows 7 gcc MinGW compiler eclipse CDT
I got confused with the output I got.. I have no reason to support the result of my program, if anyone has any idea on this please share it and help me.
Program:
#include<stdio.h>
#include<conio.h>
int main(){
unsigned long int b;
unsigned int a;
printf("%d",sizeof(b));
printf("\n");
printf("%d",sizeof(a));
}
OUTPUT:
4
4
Online GCC compier version 4.8.1 for the same program gives the different output
8
4