● 下面程序运行后的输出结果是 (59) 。#include stdio.h#include string.hvoid main(){char a[7] = "china";int i, j;i = sizeof(a); j = strlen(a);printf("%d, %d\n", i, j);}(59)A. 5, 5B. 6, 6C. 7, 5D. 7, 6

● 下面程序运行后的输出结果是 (59) 。

#include <stdio.h>

#include <string.h>

void main()

{

char a[7] = "china";

int i, j;

i = sizeof(a); j = strlen(a);

printf("%d, %d\n", i, j);

}

(59)

A. 5, 5

B. 6, 6

C. 7, 5

D. 7, 6


相关考题:

下列程序的输出结果是______。 include include using namespace std; voi 下列程序的输出结果是______。include<iostream.h>include<string.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,ch);cout<<ch;return 0;}

下面程序运行后输出的结果是【】。 include using namespace std; class example{ const 下面程序运行后输出的结果是【 】。include <iostream>using namespace std;class example{const int m;public:example(int i):m(i){}void pr(){cout<<"m="<<m<<endl'}};int main(){example x(100);x.pr();return 0;}

以下程序运行后的输出结果是【】。 include using namespace std; int main() {int i=10, 以下程序运行后的输出结果是【 】。include<iostream>using namespace std;int main(){int i=10,i:0;do{j=j+i;i--;}while(i>2);cout<<j<<end1;return 0;}

以下程序运行后的输出结果是【】include main ( ) {char a[] ="123456789", *p;int i =0; 以下程序运行后的输出结果是【 】include <stdio.h>main ( ){ char a[] ="123456789", *p;int i =0;p=a;while( * p){ if(i%2 ==0) *p='*';p++;i++;}puts(a);}

下面程序的输出结果是( )。 include main() {static char a[]="china"; char*ptr=a; whi 下面程序的输出结果是( )。 include<stdio.h> main() {static char a[]="china"; char*ptr=a; while(*ptr) {printf("%c",*ptr-32); ptr++; } }

以下程序运行后的输出结果是( )。 include main(){ int a=1, b=7; do { b=b/2; a+=b 以下程序运行后的输出结果是( )。include<stdio.h>main(){ int a=1, b=7;do {b=b/2; a+=b;} while(b>1);printf("%d\n",A);}

下面程序运行输出的结果是【】。 include using namespace std; int main(){char a[]="C 下面程序运行输出的结果是【 】。include <iostream>using namespace std;int main(){char a[]="Chinese";a[3]='\0';cout<<a<<endl;return 0;}

当执行下面的程序时,如果输入ABC,则输出结果是 ( ) include include 当执行下面的程序时,如果输入ABC,则输出结果是 ( ) # include<stdio.h> # include<string.h> main( ) { char ss [10] ="12345"; gets(ss);strcat(ss"6789");printf("%s\n",ss); }A.ABC6789B.ABC67C.12345ABC6D.ABC456789

有以下程序 include main( ) { printf("%d\n",NULL); } 程序运行后的输出结果是 有以下程序#include <stdio.h>main( ){ printf("%d\n",NULL); }程序运行后的输出结果是A.0B.1C.-1D.NULL没定义,出错

下面程序的执行结果是【】。 include include using namespace std; void main( 下面程序的执行结果是【 】。include<iostream>include<iomanip>using namespace std;void main(){cout<<setfill('x')<<setw(10);cout<<"Hello"<<endl;}

有以下程序:include main(){ printf("%d\n",NULL);}程序运行后的输出结果是()。A.0B.1C 有以下程序: #include<stdio.h> main() { printf("%d\n",NULL);} 程序运行后的输出结果是( )。A.0B.1C.-1D.NULL没定义,出错

下面程序段的运行结果是 include void main( ) {char*s="abcde"; S+=2; 下面程序段的运行结果是 #include<iostream.h> void main( ) { char*s="abcde"; S+=2; cout<<s;}A.cdeB.字符'c'C.字符'c'的地址D.无确定的输出结果

有以下程序: include main( ) {char s[ ] ="159" , * p;p=s;printf( "% c", * p + + 有以下程序: #include <stdio.h> main( ) { char s[ ] ="159" , * p; p=s; printf( "% c", * p + + ); printf("%~", * p++);}程序运行后的输出结果是( )。A.15B.16C.12D.59

有以下程序includemain(){int a=5,b=lt; t=(a 有以下程序 #include<stdio.h> main() { int a=5,b=lt; t=(a<<2)|b;printf("%d\n",t); } 程序运行后的输出结果是______。A.21B.11C.6D.1

以下程序运行后的输出结果是( )。 include main() { int x=20; printf("%d", 0 以下程序运行后的输出结果是( )。include<stdio.h>main(){ int x=20;printf("%d", 0<x<20);printf("%d\n", 0<x x<20);}

下面程序的运行结果是( )。include main(){int a=25; fun(A); }fun(int *x){ print 下面程序的运行结果是( )。include<stdio.h>main(){int a=25;fun(A);}fun(int *x){ printf("%d\n",++*x);}

下面程序运行后的输出结果是( )。 include main() {int a[]={1,2,3,4,5,6},*k[3],i=1; w 下面程序运行后的输出结果是( )。include<stdio.h>main(){int a[]={1,2,3,4,5,6},*k[3],i=1;while(i<4){ k[i-1]=a[2*i-1];printf("%d",*k[i-1]);i++;}}

下面程序的输出结果是()。includeinclude"stdng.h"void main(){ char a[]="welcome 下面程序的输出结果是( )。 #include<iostream.h> #include"stdng.h" void main() { char a[]="welcome",b[]="well"; strcpy(a,b); cout<<a<<endl; }A.wellomeB.wellcomC.wellD.wellwe

有以下程序:#include程序运行后的输出结果是( )。A)26B)19C)10D)20

以下程序运行后的输出结果是【】。include main(){int i=10,j=0;do{j=j+ i; i--;}while 以下程序运行后的输出结果是【 】。include <iostream.h>main(){int i=10,j=0;do{j=j+ i; i--;}while(i>2);cout<<j;}

下面程序的运行结果是 ( ) include include main( ) { char * a=" 下面程序的运行结果是 ( ) # include<stdio.h> # include<string.h> main( ) { char * a="AbcdEf",* b="aBcD" a + +;b + +; printf("%d\n",strcmp(a,b)); }A.0B.负数C.正数D.无确定值

下面程序的输出结果是 ( ) include include { char * p1="abc" , * 下面程序的输出结果是 ( ) # include<stdio.h> # include<string.h> { char * p1="abc" , * p2=" ABC ",str[50]="xyz"; strcpy(str+2.strcat (pi,p2)); printf("%s\n",str);}A.xyzabcABB.zabcABCC.yzabcABCD.xycbcABC

有以下程序: include main( ) {intc = 35; printf( "% d \n" , ec); }程序运行 有以下程序: #include <stdio.h> main( ) { intc = 35; printf( "% d \n" , ec); } 程序运行后输出结果是( )。A.0B.70C.35D.1

下面的程序输出的结果是( )。 include using namespace std; void main(){ 下面的程序输出的结果是( )。 #include <iostream> using namespace std; void main(){ int a=2; int c=a; a++; cout<<c; }A.2B.3C.4D.*a

试题7以下程序运行后的输出结果是______。#include stdio.hmain(){ int a=37; a%=9; printf(“%d\n”, a); }

单选题有如下程序:#include #include main(){ printf(%d,strlen(0\tA011\1));}程序运行后的输出结果是(  )。A8B9C7D10

单选题有以下程序#include #include main(){ int a = 3; printf(%d,(a+=a-=a*a));}程序运行后的输出结果是(  )。A-12B9C0D3