From the compiler's point of view? Probably heaps - like 1024 chars or even more.
From a practical point of view? 80 chars - this is so one doesn't have to scroll sideways all the time ( which is rather irritating). Also if someone wants to print the code, then this is better.
I found the answer - with my best tool - Google
Google this:
C maximum statement length
Now how hard was that?
Having found the answer, I think that my original answer is more important.
Do you have a compiler error? If so, there is probably a much bigger problem.
I have googled that and got no real answer, so I started the thread.
This was the web site I found, it talks about a limit of 4095 from the C++ standard . Obviously not C, but as far as that goes, it's a reasonable answer.
I wonder why the length of a statement is a problem?
They're talking about a particular compiler (gcc) and string literals. But I don't think that such a limit exists because a picture format (XPM) consists of strings...
5.2.4.1 Translation limits
1 The implementation shall be able to translate and execute at least one
program that contains at least one instance of every one of the following limits
....
— 4095 characters in a logical source line
From the C++ Standard
Annex B (informative)
Implementation quantities [implimits]
1 Because computers are finite, C++ implementations are inevitably limited in
the size of the programs they can successfully process. Every implementation
shall document those limitations where known. This documentation may cite
fixed limits where they exist, say how to compute variable limits as a function
of available resources, or say that fixed limits do not exist or are unknown.
2 The limits may constrain quantities that include those described below or
others. The bracketed number following each quantity is recommended as the
minimum for that quantity. However, these quantities are only guidelines and
do not determine compliance.
— Characters in one logical source line [65 536].
So in C++ you can write a program horizontally in one long line.:)