Data type modifiers

What is the difference between long int and long long int?

Hi @AK072672
A long int is a signed integral type that is at least 32 bits, while a long long or long long int is a signed integral type is at least 64 bits

if you will ask shopkeeper to give two chocolates,he’ll give you two chocolates.
if you’ll ask for 2 + 2 chocolates ,he’ll give you four chocolates.
same logic here also.
long means you ask compiler to provide you space for a long integer.
and long long integer means you ask for space for integer of more length which cannot fit into long.
as aayuh said ,long is for 32 bit integer
long long is for 64 bit.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.