1. 用命令行参数实现。求命令行参数中长度最大的字符串。
#include<stdio.h>#include<string.h>char * compare(char a[], char b[]){ return strlen(a)>strlen(b)? a:b;}main(){ char a[] = "aaaaaa\0"; char b[] = "bbbbb\0"; printf("%s\n", compare(a,b));}