Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6189693
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:27:30+00:00 2026-05-24T02:27:30+00:00

printf(INT_MAX); limits.h is included, for some reason it’s not working in this particular project.

  • 0

printf(INT_MAX);

limits.h is included, for some reason it’s not working in this particular project. In my testbed, it just works. I have no idea how to approach this problem other than removing every single file in the entire project until it starts working. This would be an inhuman amount of work. How can I find this bug faster? What are common causes of this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T02:27:31+00:00Added an answer on May 24, 2026 at 2:27 am

    I assume you’ve searched your own code and build system for instances where INT_MAX might get undefined.

    If possible, find a way to compile just the one source file (.c), so that your iteration speed goes up. It is enough if your Makefile (or whatever you use) already compiles only the changed file, instead of everything.

    Then, in the problematic file, add this before the first #include, and after every #include:

    #ifndef INT_MAX
    #error INT_MAX not defined at this point
    #endif
    

    Then rebuild that module and see where the error happens.

    If that fails, add the code snippet above here and there in the code to see where it gets undefined.

    If it turns out that your <limits.h> isn’t defining it, there are at least two possibilities:

    • your platform does not conform to the C standard, at least in the way you are using it; perhaps you need to use a specific compiler switch to get the C standard?
    • your code is including a different limits.h than the standard one

    Happy hacking.

    PS. If you need to go through the process of removing files to find the problem, note that you can use binary search to speed things up: first remove one half of the files, and if the problem persists, you know it’s in the remaining files, and if not, in the files you removed, or, rarely, in the interaction between the two sets of files. Then iterate using the appropriate set of files, until you narrow it down to something sufficiently small.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

int main() { int *d=0; printf(%d\n,*d); return 0; } this works fine. >cc legal.c
I got this exercise, is not a homework , I just trying to solve:
Consider this code: void res(int a,int n) { printf(%d %d, ,a,n); } void main(void)
#include<limits.h> #include<errno.h> long output; errno = 0; output = strtol(input,NULL,10); printf(long max = %ld\n,LONG_MAX);
#include <stdio.h> #include <limits.h> int main(void){ printf("Type Size Min Max\n----------------------------------------------------------------------\n"); printf("%-20s%-10d%-20ld%-20ld\n", "long", sizeof(long), LONG_MIN,
I wrote a program to fill in closed figures with asterisks. For some reason
(can skip this part just an explanation of the code below. my problems are
Session transcript: > type lookma.c int main() { printf("%s", "no stdio.h"); } > cl
#include<stdio.h> int main() { printf(He %c llo,65); } Output: He A llo #include<stdio.h> int
I have a library I created, File mylib.c: #include <mylib.h> int testlib() { printf("Hello,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.