long long int was added to C99 and was supported as an extension by some C89/90 compilers well before C99 was introduced.
For compilers supporting long long int:
You can specify a long long int constant by appending LL to the end of your constant
1LL
, similary you can use ULL for an unsigned long long int constant.
For printf and scanf you can use the modifier ll in the same way you would have used the l modifier for longs
-
long long int value = 5LL;
-
-
printf("%lld\n", value);
-
Generally if a C89/90 compiler supports long long as an extension then it will have support for constants of the type and support in scanf/printf too. However that support may not conform exactly to the C99 standard, i.e. it may use something other than ll as a modifier in printf strings.
You need to check the documentation of the platform/compiler to see what it supports.