Sujet : Re: Suggested method for returning a string from a C program?
De : jameskuyper (at) *nospam* alumni.caltech.edu (James Kuyper)
Groupes : comp.lang.cDate : 19. Mar 2025, 18:40:10
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vrevhq$15bib$1@dont-email.me>
References : 1 2 3 4 5
User-Agent : Mozilla Thunderbird
On 3/19/25 13:23, DFS wrote:
...
int64_t n = 0, max = 0, thismax = 0;
...
printf("\nmax n = %lld reached at input = %d\n", max, input);
...
You'll get compilation warnings about the printf specifier used with
int64_t.
Not if you use the correct specifier:
#include <inttypes.h>
printf("\nmax n = %" PRId64 " reached at input = %d\n", max, input);