码迷,mamicode.com
首页 > 编程语言 > 详细

二维字符数组输出

时间:2020-06-05 15:11:49      阅读:67      评论:0      收藏:0      [点我收藏+]

标签:数组   pre   har   ++   turn   std   i++   return   int   

#include <stdio.h>

int main()
{
    char a[3][5] = {{‘m‘,‘a‘,‘n‘,‘g‘,‘o‘},{‘a‘,‘p‘,‘p‘,‘l‘,‘e‘},{‘g‘,‘r‘,‘a‘,‘p‘,‘e‘}};

    for(int i = 0; i < 3; i++)
    {
        for(int j = 0;j < 5; j++)
        {
            printf("%c",a[i][j]);
        }
        printf("\n");
    }

    return 0;
}

  

二维字符数组输出

标签:数组   pre   har   ++   turn   std   i++   return   int   

原文地址:https://www.cnblogs.com/Open-Source/p/13049377.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!