首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
有如下的程序: #include <iostream> #include <fstream> using namespace std; int main() { ofstream outf("D:\\temp.t
有如下的程序: #include <iostream> #include <fstream> using namespace std; int main() { ofstream outf("D:\\temp.t
admin
2010-03-29
14
问题
有如下的程序:
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
ofstream outf("D:\\temp.txt",ios_base::trunc) ;
outf<<"World Wide Web";
outf.close();
ifstream inf("D:\\temp.txt");
char s[20];
inf>>s;
inf.close();
cout<<s;
return 0;
}
执行后的输出结果是【 】。
选项
答案
World
解析
提取运算符>>在读取数据时遇到空格、Tab符号以及回车符时将结束此次相关操作。
转载请注明原文地址:https://jikaoti.com/ti/KmW0FFFM
本试题收录于:
二级C题库NCRE全国计算机二级分类
0
二级C
NCRE全国计算机二级
相关试题推荐
下列叙述中正确的是
以下叙述中错误的是
有以下程序structS{inta,b;}data[2]={10,100,20,200};main(){structSP=data[1];printf("%d\n",++(p.a));}程序运行后的输出结果是
设有定义:inta=1,b=2,c=3;以下语句中执行效果与其它三个不同的是
负责数据库中查询操作的数据库语言是
对长度为10的线性表进行冒泡排序,最坏情况下需要比较的次数为()。
对于if(表达式)语句,以下叙述正确的是()。
面不属于软件需求分析阶段主要工作的是
一个栈的初始状态为空。现将元素1,2,3,A,B,C依次人栈,然后再依次出栈,则元素出栈的顺序是()。
下列特征中不是面向对象方法的主要特征的是()。
随机试题
薄雾浓云愁永昼,瑞脑消金兽。消:
国际上最流行的分时操作系统是()。
可以与甘草相配伍应用的药物不包括
下列工作中属于沉井施工准备工作的是()。
商业银行的最高风险管理/决策机构是()。
于某在一次商场的有奖购物活动中,购买了1000元的商品,中奖一台价值3000元的海尔牌冰箱。于某应缴纳的个人所得税税额为()元。
奥苏伯尔提出的教学原则包括()。
已知数组a中的元素个数为n,下列语句的作用是将下标为i的元素移动到下标为 i-1的单元,其中1≤i<n。例如,当n=4,a中原有数据为1,2,3,4时,则移动后a中元素变为2,3,4,4。请将语句补充完整:for(int i=0;i<n-1;i++)
Inthispart,youarerequiredtowriteacompositionentitledOnBuildingaHarmoniousSocietyinnolessthan200words.Your
A、Theman’snewalbumanditspromotion.B、Theman’sconcertanditsaudience.C、Theman’newalbumandthelanguageinit.D、Th
最新回复
(
0
)