单选题

有以下程序 #include  ...

发布于 2022-03-03 11:36:07

有以下程序
#include<iostream> 
#include<fstream> 
#include<string> 
using namespace std 
int main()  {
    ofstream File1("text.txt")  
    string d("20160314") 
    string y=d.substr(0,4) 
    int k=d.find("2")
    int i=d.find("3") 
    string m=d.substr(k+2,i-k) 
    string dd=d.substr(i+1,2) 
    string n=dd+m+y 
    File1<<n<<endl 
    File1.close() 
}                                            
文件text.txt中写入的结果是(      )?

登录后免费查看答案
关注者
0
被浏览
16
知识点
面圈网VIP题库

面圈网VIP题库全新上线,海量真题题库资源。 90大类考试,超10万份考试真题开放下载啦

去下载看看