循环输出指针的字符串

#include "stdio.h"
void mytest(const char *str);

main()
{
mytest("Hello, Welcome to you.");
return 0;
}

void mytest(const char *str)
{
while(*str)
{
if(str == "")
{
printf("%c", "");
}
else
{
printf("%c", *str);
}
str++;
}
printf("\n");
}

原文地址:https://www.cnblogs.com/xiaocai0923/p/2222064.html