what is the difference between int and long in c?
Generally, you can store larger numbers in a “long int” than you can in an “int”. On most (but not all) C++ implementations, an “int” is 32 bits long and can store any number between zero and about 4 billion. But a “long int” is (typically) 64 bits and can store numbers up to 16 quadrillion.