以下程序的输出结果是( )。 #include<iostream> #include<stdlib> using namespace std; void func(char **m) { ++m; cout<<*m<<endl; } main() { static char *a[]={"MORNING","AFTERNOON","EVENING"); char **n; n=a; func(n); system("PAUSE"); return 0; }
A.为空
B.MORNING
C.AFTERNOON
D.EVENING
第1题:
以下程序的执行结果是【 】。
include <iostream.h>
include <fstream.h>
include <stdlib.h>
int main()
{
fstream outfile, infile;
outfile.open("D:\\text.dat",ios::out);
if(!outfile)
{
cout<<"text.dat can't open"<<end1
第2题:
下列程序的输出结果是______。
include <iostream.h>
include <cstring.h>
using namespace std;
void fun(const char*s,char &C) {c=s[strlen (s)/2];}
int main {)
{
char str [] ="ABCDE";
char ch=str[1];
fun(str,sh);
cout<<Ch;
return 0;
}
第3题:
C++中引用输入输出头文件语句是:
A.#include <stdlib>
B.#include <iostream>
C.#include <stdlib.h>
D.#include <stream.h>
第4题:
以下程序的执行结果是_______。
include<iostream.h>
include<fstream.h>
include<stdlib.h>
void main()
{
char ch:
fstream file:
file.open("abc.dat",ios::out1ios::inlios::binary);
if(! file)
{
cout<<“abc.dat文件不能打开”<<endl:
abort
第5题:
3、以下程序的输出是 。(递归) #include<iostream> using namespace std; void func(char c) { cout << c; if(c < ‘5’) func(c+1); cout<<c<<endl; } void main() { func(‘0’); }