C++入门经典-例6.4-输出字符数组中的内容

时间:2017-09-16 15:40:26   收藏:0   阅读:286

1:代码如下:

技术分享
// 6.4.cpp : 定义控制台应用程序的入口点。
//

#include "stdafx.h"
#include<iostream>
using namespace std;
void main()
{
    int i;
    char array[12]={H,E,L,L,O, ,W,O,R,L,D};
    for(i=0;i<12;i++)
        cout<<array[i];
    cout << endl;
}
View Code

运行结果:

技术分享

原文:http://www.cnblogs.com/lovemi93/p/7531326.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!