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

1:代码如下:

C++入门经典-例6.4-输出字符数组中的内容C++入门经典-例6.4-输出字符数组中的内容
// 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

运行结果:

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

posted @ 2017-09-16 14:52 一串字符串 阅读(...) 评论(...) 编辑 收藏

相关文章:

  • 2021-09-05
  • 2021-12-23
  • 2022-01-02
  • 2021-07-19
  • 2021-11-18
猜你喜欢
  • 2022-01-08
  • 2021-05-28
  • 2022-01-17
  • 2021-10-11
相关资源
相似解决方案