自考新教材-p291
作者:互联网
源程序:
//程序7-10
#include <iostream>
using namespace std;
int main()
{
char c = 'a', str[80] = "0123456789abcdefghijklmn";
int x = 65;
cout << "cout.put('a'):";
cout.put('a');
cout << "\ncout.put(c+25):";
cout.put(c + 25);
cout << "\ncout.put(x):";
cout.put(x);
cout.write(str, 20); //将str的前20个字节写入到输出流中
system("pause");
return 0;
}
运行结果:
标签:20,cout,新教材,p291,int,str,put,自考 来源: https://www.cnblogs.com/duanqibo/p/12236016.html