The warning is likely because INT_MAX is a long int constant, but you're using the %d format specifier, which is for int .
To fix this, you can use the %ld format specifier, which is for long int :
#include
#include
int main() {
printf("Here is the largest int value - %ld\n", INT_MAX);
return 0;
}
Alternatively, you can cast INT_MAX to an int, but this might truncate the value if int is smaller than long int on your system:
printf("Here is the largest int value - %d\n", (int)INT_MAX);