Re: OT programming challenge: fastest/best/shortest C program to jumble a sentence, then restore it

Liste des GroupesRevenir à ol advocacy 
Sujet : Re: OT programming challenge: fastest/best/shortest C program to jumble a sentence, then restore it
De : bowman (at) *nospam* montana.com (rbowman)
Groupes : comp.os.linux.advocacy
Date : 09. Mar 2024, 04:48:10
Autres entêtes
Message-ID : <l520v9FqgibU5@mid.individual.net>
References : 1 2 3 4 5
User-Agent : Pan/0.149 (Bellevue; 4c157ba)
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.
gcc -std=gnu99  shuffle.c -o shuffle
works fine.
Date Sujet#  Auteur
7 Mar 24 * OT programming challenge: fastest/best/shortest C program to jumble a sentence, then restore it26DFS
7 Mar 24 `* Re: OT programming challenge: fastest/best/shortest C program to jumble a sentence, then restore it25rbowman
8 Mar 24  +* Re: OT programming challenge: fastest/best/shortest C program to jumble a sentence, then restore it23DFS
8 Mar 24  i`* Re: OT programming challenge: fastest/best/shortest C program to jumble a sentence, then restore it22rbowman
8 Mar 24  i +* Re: OT programming challenge: fastest/best/shortest C program to jumble a sentence, then restore it8DFS
8 Mar 24  i i+* Re: OT programming challenge: fastest/best/shortest C program to jumble a sentence, then restore it4DFS
9 Mar 24  i ii`* Re: OT programming challenge: fastest/best/shortest C program to jumble a sentence, then restore it3rbowman
9 Mar 24  i ii `* Re: OT programming challenge: fastest/best/shortest C program to jumble a sentence, then restore it2vallor
9 Mar 24  i ii  `- Re: OT programming challenge: fastest/best/shortest C program to jumble a sentence, then restore it1rbowman
9 Mar 24  i i`* Re: OT programming challenge: fastest/best/shortest C program to jumble a sentence, then restore it3rbowman
9 Mar 24  i i `* Re: OT programming challenge: fastest/best/shortest C program to jumble a sentence, then restore it2vallor
9 Mar 24  i i  `- Re: OT programming challenge: fastest/best/shortest C program to jumble a sentence, then restore it1rbowman
9 Mar 24  i `* Re: OT programming challenge: fastest/best/shortest C program to jumble a sentence, then restore it13DFS
9 Mar 24  i  `* Re: OT programming challenge: fastest/best/shortest C program to jumble a sentence, then restore it12rbowman
9 Mar 24  i   +- Re: OT programming challenge: fastest/best/shortest C program to jumble a sentence, then restore it1DFS
9 Mar 24  i   `* Re: OT programming challenge:10rbowman
10 Mar 24  i    `* Re: OT programming challenge:9Chris Ahlstrom
10 Mar 24  i     `* Re: OT programming challenge:8rbowman
10 Mar 24  i      +* Re: 16-bit floating-point.5rbowman
10 Mar 24  i      i`* Re: Some examples ?4rbowman
11 Mar 24  i      i `* Re: How does your Pico "make sure everything is working" ?3rbowman
11 Mar 24  i      i  `* Re: I was burning EEPROMs for handheld devices back in 1984, Orem Utah.2rbowman
11 Mar 24  i      i   `- Re: Had any good Blutwurst lately ?1rbowman
10 Mar 24  i      +- Re: OT programming challenge:1Chris Ahlstrom
10 Mar 24  i      `- Re: 16-bit floating-point.1DFS
9 Mar 24  `- Re: OT programming challenge: fastest/best/shortest C program to jumble a sentence, then restore it1DFS

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal