#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string>
int main()
{
char a[4] = {'a','b','c','d'};//注意这里每个数组元素都必须加单引号
char b[5] = { 'a', 'b', 'c', 'd','e' };
for (int i = 0; i < 4; i++)
{
for (int j = 0; j < 5; j++)
{
printf("<%c,%c>\n", a[i], b[j]);//注意格式控制字符必须是%c
}
}
system("pause");
return 0;
![](https://i-blog.csdnimg.cn/blog_migrate/df4c11aa53f6ae678bb28ccf04fb0de1.png)