#include
int main(void)
{
const char *pat[3] = {"are", "you", "ok"};
const char **fp = pat;
const char *p;
while (*fp) {
p = *fp++;
printf ("%s\n", p);
}
return 0;
}
[beyes@beyes strp]$ ./strp
are
you
ok
ok
@���
UWVS�i
#include <stdio.h>
int main(void)
{
const char *pat[4] = {"are", "you", "ok", NULL};
const char **fp = pat;
const char *p;
while (*fp) {
p = *fp++;
printf ("%s\n", p);
}
return 0;
}
欢迎光临 曲径通幽论坛 (http://www.groad.net/bbs/) | Powered by Discuz! X3.2 |