C++初步介绍-课后任务
我要参与
C++初步介绍-课后任务
学习任务 1.8k
等6人参与
来源: 第17周 / 物联网/嵌入式工程师

任务

用C++输出以下内容:

int data  = 100;
char *str = "hello world";
int a[]   = {1,2,3,4,5,6,7};
  • 1
  • 2
  • 3
代码块
复制 预览
复制成功!
去发布

登录后即可发布作业,立即

我的作业

全部作业 100

慕运维8597106
#include <iostream>
using namespace std;

int main()
{
	int data = 100;
	cout << data << endl;
	const char *str = "hello world";
	cout << str << endl;
	int a[] = {1,2,3,4,5,6,7};
	int i = 0;
	for(i = 0;i < sizeof(a) / sizeof(int);i++){
		cout << a[i] << " ";
	}
	cout << endl;
	return 0;
}
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
代码块
复制 预览
复制成功!
提交于  2025-03-12 01:59:14
评论 1
讲师点评
评分:100
无__名
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号

在线咨询

领取优惠

免费试听

领取大纲

扫描二维码,添加
你的专属老师