i wrote this code:
#include <iostream>
using namespace std;
int main()
{
int a;
long int b;
cout << sizeof(a) << endl; /*output : 4 bytes */
cout << sizeof(b) << endl; /* output : 4 bytes */
return 0;
}
im using windows 10 64 bits operation system and i found this , but when i tried online compiler it shows diffrent : sizeof(int) == 4 bytes ; sizeof(long int) == 8 bytes why this ?? and how it works on other operation systems like linux ..... my greeting <3