[单选题]

阅读以下程序 include void main( ) { char line[10]; cin>>line; cout<

阅读以下程序

#include<iostream.h>

void main( )

{

char line[10];

cin>>line;

cout<<line<<endl;

}

如运行时输入This is example.<CR>,则程序的输出结果是

A.This

B.This is

C.This is a

D.This is an example.

参考答案与解析:

相关试题

阅读以下程序 #include void main( ) { ifstream

[单选题]阅读以下程序 include void main( ) { ifstream infile; ofstream outfile; fstream阅读以下程序#include<fstream.h>void main( ){ifstream infile;ofstream outfile;fstream iofile;iofile.open("a.txt",ios::in);iofile.close( );iofile.open("b.txt",ios::out);}下列描述错误的是A.对象

  • 查看答案
  • 阅读以下程序 #includc vold main() { Char line[

    [单选题]阅读以下程序 includc vold main() { Char line[10]; cin>>line;阅读以下程序 #includc<iostream.h> vold main() { Char line[10]; cin>>line; cout<<line<<endl; } 如运行时输入This is example.<CR>,则程序的输出结果是A.ThisB.This isC.This is aD.This is an example.

  • 查看答案
  • 有以下程序:#include<stdioh>void main(){char c

    [单选题]有以下程序:#include<stdioh>void main(){char c1,c2,c3,c4,c5,c6;c5=getchar();c6=getchar();scanf("%c%c%c%c",&c1,&c2,&c3,&c4);putchar(c1);putchar(c2);printf("%c%c/n",c5,c6);}程序运行后,若从键盘输入(从第1列开始),则输出结果是( )。123<回车>45678<回车>

  • 查看答案
  • 下面程序的运行结果为 #include void main( ) {char a

    [单选题]下面程序的运行结果为 include void main( ) {char a='3'; switch(a) { case'3':下面程序的运行结果为#include<iostream.h>void main( ){char a='3';switch(a){case'3':cout < <"3";case'2':cout < < "2";break;default:cout < <"1";}}A.3B.321C.31D.32

  • 查看答案
  • 下列程序的输出结果为 #include void main( ) { char

    [单选题]下列程序的输出结果为 include void main( ) { char * a[ ] ={"hello},"the"," wo下列程序的输出结果为#include<iostream.h>void main( ){char * a[ ] ={"hello},"the"," world"};char * * pa=a;pa++;cout < < * pa < < endl;}A.helloB.theC.worldD.hellotheworld

  • 查看答案
  • 有以下程序 #include #include void fun(char

    [单选题]有以下程序 include include void fun(char s[][10],int n有以下程序 #include <stdio.h> #include <string.h> void fun(char s[][10],int n) { char t; int i j; for (i=0; i<n-1; i++) for 0--i+l; j<n; j++) /*比较字符串的首字符大小,并交换字符串的首字符*/ if(s[i][0] > s[j][0]) { t = s[i][0]

  • 查看答案
  • 有以下程序 #include #include void fun(char

    [单选题]有以下程序 include include void fun(char s[][10],int n有以下程序 #include <stdio.h> #include <string.h> void fun(char s[][10],int n) { char t; int i j; for (i=0; i<n-1; i++) for 0--i+l; j<n; j++) /*比较字符串的首字符大小,并交换字符串的首字符*/ if(s[i][0] > s[j][0]) { t = s[i][0]

  • 查看答案
  • 有以下程序: #include #include main( ) {char

    [单选题]有以下程序: include include main( ) {char p[] = {'a','b','c'] ,q[10有以下程序: #include <stdio.h> #include <string.h> main( ) { char p[] = {'a','b','c'] ,q[10] = {'a','h','c'} prinff( "% d % d/n" , strlen (p) , strlen (q) );以下叙述中正确的是( )。A

  • 查看答案
  • 有以下程序:#include #include void main(){doub

    [单选题]有以下程序:include include void main(){double d= 123.456789;cout<

  • 查看答案
  • 有以下程序 #include void fun(char *t, char *

    [单选题]有以下程序 include void fun(char *t, char *s) { whil有以下程序 #include <stdio.h> void fun(char *t, char *s) { while(*t!=0) t++; while( (*t++ = *s++ )!=0 ); main() { char ss[10]="acc",aa[10]="bbxxyy"; fun(ss, aa); printff"%s,%s/n", ss,aa); 程序的运行结果是A.acc

  • 查看答案
  • 阅读以下程序 #include void main( ) { char line