/*
*Copyright (c)2015,烟台大学计算机与控制工程学院
*All rights reserved.
*文件名称:score.cpp
*作 者:惠睿
*完成日期:2015年6月10日
*版 本 号:v1.0
*
*问题描述:阅读程序,写出程序的运行结果并理解。
*程序输入:无输入。
*程序输出:输出调用函数后的值。
*/
#include<iostream>
using namespace std;
int main( )
{
char ch[20];
cout<<"enter a sentence:"<<endl;
cin.get(ch,10,'\n');//指定换行符为终止字符
cout<<ch<<endl;
return 0;
}
运行结果: