Sujet : Re: OT programming challenge: fastest/best/shortest C program to jumble a sentence, then restore it
De : vallor (at) *nospam* cultnix.org (vallor)
Groupes : comp.os.linux.advocacyDate : 09. Mar 2024, 05:01:37
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <usgjeh$1rnlb$2@dont-email.me>
References : 1 2 3 4 5 6
User-Agent : Pan/0.155 (Kherson; c0bf34e gitlab.gnome.org/GNOME/pan.git; x86_64-pc-linux-gnu)
On 9 Mar 2024 02:48:10 GMT, rbowman <
bowman@montana.com> wrote in
<
l520v9FqgibU5@mid.individual.net>:
On Fri, 8 Mar 2024 15:22:06 -0500, DFS wrote:
FYI:
Obviously you didn't put it back together after word wrap broke it up.
gcc -pedantic -Wall -Wcast-qual -Wmissing-prototypes -Wshadow shuffle.c
- o shuffle
runs with no errors or warnings. If you throw in -std=c99
gcc -std=c99 shuffle.c -o shuffle shuffle.c: In function ‘main’:
shuffle.c:8:22: warning: implicit declaration of function ‘strdup’; did
you mean ‘strcmp’? [-Wimplicit-function-declaration]
8 | char* sentence = strdup("Once you try it, you'll see it
doesn't need spice.");
| ^~~~~~
| strcmp
shuffle.c:8:22: warning: initialization of ‘char *’ from ‘int’ makes
pointer from integer without a cast [-Wint-conversion]
Why? you might ask? ISO C99 doesn't include strdup although it's strange
it pulls strcmp out of its ass.
What about:
char sentence[] = "Once you try it, you'll see it doesn't need spice.";
?
gcc -std=gnu99 shuffle.c -o shuffle
works fine.
-- -v
Date | Sujet | # | | Auteur |
7 Mar 24 | OT programming challenge: fastest/best/shortest C program to jumble a sentence, then restore it | 26 | | DFS |
7 Mar 24 | ![`](img/L.gif) Re: OT programming challenge: fastest/best/shortest C program to jumble a sentence, then restore it | 25 | | rbowman |
8 Mar 24 | ![](img/e.gif) ![+](img/T.gif) Re: OT programming challenge: fastest/best/shortest C program to jumble a sentence, then restore it | 23 | | DFS |
8 Mar 24 | ![](img/e.gif) ![i](img/I.gif) ![`](img/L.gif) Re: OT programming challenge: fastest/best/shortest C program to jumble a sentence, then restore it | 22 | | rbowman |
8 Mar 24 | ![](img/e.gif) ![i](img/I.gif) ![](img/e.gif) ![+](img/T.gif) Re: OT programming challenge: fastest/best/shortest C program to jumble a sentence, then restore it | 8 | | DFS |
8 Mar 24 | ![](img/e.gif) ![i](img/I.gif) ![](img/e.gif) ![i](img/I.gif) ![+](img/T.gif) Re: OT programming challenge: fastest/best/shortest C program to jumble a sentence, then restore it | 4 | | DFS |
9 Mar 24 | ![](img/e.gif) ![i](img/I.gif) ![](img/e.gif) ![i](img/I.gif) ![i](img/I.gif) ![`](img/L.gif) Re: OT programming challenge: fastest/best/shortest C program to jumble a sentence, then restore it | 3 | | rbowman |
9 Mar 24 | ![](img/e.gif) ![i](img/I.gif) ![](img/e.gif) ![i](img/I.gif) ![i](img/I.gif) ![](img/e.gif) ![`](img/L.gif) Re: OT programming challenge: fastest/best/shortest C program to jumble a sentence, then restore it | 2 | | vallor |
9 Mar 24 | ![](img/e.gif) ![i](img/I.gif) ![](img/e.gif) ![i](img/I.gif) ![i](img/I.gif) ![](img/e.gif) ![](img/e.gif) ![`](img/L.gif) Re: OT programming challenge: fastest/best/shortest C program to jumble a sentence, then restore it | 1 | | rbowman |
9 Mar 24 | ![](img/e.gif) ![i](img/I.gif) ![](img/e.gif) ![i](img/I.gif) ![`](img/L.gif) Re: OT programming challenge: fastest/best/shortest C program to jumble a sentence, then restore it | 3 | | rbowman |
9 Mar 24 | ![](img/e.gif) ![i](img/I.gif) ![](img/e.gif) ![i](img/I.gif) ![](img/e.gif) ![`](img/L.gif) Re: OT programming challenge: fastest/best/shortest C program to jumble a sentence, then restore it | 2 | | vallor |
9 Mar 24 | ![](img/e.gif) ![i](img/I.gif) ![](img/e.gif) ![i](img/I.gif) ![](img/e.gif) ![](img/e.gif) ![`](img/L.gif) Re: OT programming challenge: fastest/best/shortest C program to jumble a sentence, then restore it | 1 | | rbowman |
9 Mar 24 | ![](img/e.gif) ![i](img/I.gif) ![](img/e.gif) ![`](img/L.gif) Re: OT programming challenge: fastest/best/shortest C program to jumble a sentence, then restore it | 13 | | DFS |
9 Mar 24 | ![](img/e.gif) ![i](img/I.gif) ![](img/e.gif) ![](img/e.gif) ![`](img/L.gif) Re: OT programming challenge: fastest/best/shortest C program to jumble a sentence, then restore it | 12 | | rbowman |
9 Mar 24 | ![](img/e.gif) ![i](img/I.gif) ![](img/e.gif) ![](img/e.gif) ![](img/e.gif) ![+](img/T.gif) Re: OT programming challenge: fastest/best/shortest C program to jumble a sentence, then restore it | 1 | | DFS |
9 Mar 24 | ![](img/e.gif) ![i](img/I.gif) ![](img/e.gif) ![](img/e.gif) ![](img/e.gif) ![`](img/L.gif) Re: OT programming challenge: | 10 | | rbowman |
10 Mar 24 | ![](img/e.gif) ![i](img/I.gif) ![](img/e.gif) ![](img/e.gif) ![](img/e.gif) ![](img/e.gif) ![`](img/L.gif) Re: OT programming challenge: | 9 | | Chris Ahlstrom |
10 Mar 24 | ![](img/e.gif) ![i](img/I.gif) ![](img/e.gif) ![](img/e.gif) ![](img/e.gif) ![](img/e.gif) ![](img/e.gif) ![`](img/L.gif) Re: OT programming challenge: | 8 | | rbowman |
10 Mar 24 | ![](img/e.gif) ![i](img/I.gif) ![](img/e.gif) ![](img/e.gif) ![](img/e.gif) ![](img/e.gif) ![](img/e.gif) ![](img/e.gif) ![+](img/T.gif) Re: 16-bit floating-point. | 5 | | rbowman |
10 Mar 24 | ![](img/e.gif) ![i](img/I.gif) ![](img/e.gif) ![](img/e.gif) ![](img/e.gif) ![](img/e.gif) ![](img/e.gif) ![](img/e.gif) ![i](img/I.gif) ![`](img/L.gif) Re: Some examples ? | 4 | | rbowman |
11 Mar 24 | ![](img/e.gif) ![i](img/I.gif) ![](img/e.gif) ![](img/e.gif) ![](img/e.gif) ![](img/e.gif) ![](img/e.gif) ![](img/e.gif) ![i](img/I.gif) ![](img/e.gif) ![`](img/L.gif) Re: How does your Pico "make sure everything is working" ? | 3 | | rbowman |
11 Mar 24 | ![](img/e.gif) ![i](img/I.gif) ![](img/e.gif) ![](img/e.gif) ![](img/e.gif) ![](img/e.gif) ![](img/e.gif) ![](img/e.gif) ![i](img/I.gif) ![](img/e.gif) ![](img/e.gif) ![`](img/L.gif) Re: I was burning EEPROMs for handheld devices back in 1984, Orem Utah. | 2 | | rbowman |
11 Mar 24 | ![](img/e.gif) ![i](img/I.gif) ![](img/e.gif) ![](img/e.gif) ![](img/e.gif) ![](img/e.gif) ![](img/e.gif) ![](img/e.gif) ![i](img/I.gif) ![](img/e.gif) ![](img/e.gif) ![](img/e.gif) ![`](img/L.gif) Re: Had any good Blutwurst lately ? | 1 | | rbowman |
10 Mar 24 | ![](img/e.gif) ![i](img/I.gif) ![](img/e.gif) ![](img/e.gif) ![](img/e.gif) ![](img/e.gif) ![](img/e.gif) ![](img/e.gif) ![+](img/T.gif) Re: OT programming challenge: | 1 | | Chris Ahlstrom |
10 Mar 24 | ![](img/e.gif) ![i](img/I.gif) ![](img/e.gif) ![](img/e.gif) ![](img/e.gif) ![](img/e.gif) ![](img/e.gif) ![](img/e.gif) ![`](img/L.gif) Re: 16-bit floating-point. | 1 | | DFS |
9 Mar 24 | ![](img/e.gif) ![`](img/L.gif) Re: OT programming challenge: fastest/best/shortest C program to jumble a sentence, then restore it | 1 | | DFS |