编程知识 cdmana.com

Que signifie cette étape? En échange de quoi?

#include <stdio.h>#include <stdlib.h>#include <string.h>int main(){    char *s[3], st[3][10], **p, *t;    int i, j;    for (i=0, printf("Please enter 3 strings: "); i<3; s[i]=st[i], scanf("%s", s[i++]));    for (i=0; i<3; i++)        for (j=i+1; j<3; strcmp(s[i], s[j])>0 ? t=s[i], s[i]=s[j], s[j]=t, j++ : j++);    for (p=s; p<s+3; printf("%s ", *p++));    printf("\n");    system("pause");    return 0;}

t=s[i], s[i]=s[j], s[j]=t

版权声明
本文为[Questions et réponses du rseoc]所创,转载请带上原文链接,感谢
https://cdmana.com/2021/10/20211024105050532r.html

Scroll to Top