69,382
社区成员
发帖
与我相关
我的任务
分享
#include <stdio.h>
void prints(char **strings) {
while (*strings != NULL) {
printf("%s\n",strings);
strings++;
}
}
int main(int argc, char *argv[])
{
char array[2][20] = {
{"This is a test"},
{"Hello world"}
};
char (*p)[20]=array;
char **point = p;
prints(point);
return 0;
}
#include <stdio.h>
void prints(char **strings) {
while (*strings != NULL) { // ???
// printf("%s\n",strings);
printf("%s\n",*strings);
strings++;
}
}
int main(int argc, char *argv[])
{
char array[2][20] = {
{"This is a test"},
{"Hello world"}
};
// char (*p)[20]=array;
char *p[2]={array[0], array[1]};
char **point = p;
prints(point);
return 0;
}
#include "string.h"
void prints(char **strings) {
puts(*strings); // This is a test
puts(++*strings); // his is a test
puts(strings[1]); // Hello world
}
int main(int argc, char *argv[])
{
char array[2][20] = {
{"This is a test"},
{"Hello world"}
};
// char (*p)[20]=array;
char *p[2]={array[0], array[1]};
char **point = p;
prints(point);
return 0;
}