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

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

8

B

9

C

7

D

10


参考解析

解析:
strlen是求字符串长度的函数,"0\tA011\1"是一个长度为8的字符串,其中\t、、\1均为转义字符常量,但是长度也是1,因此输出结果是8,答案选择A选项。

相关考题:

以下四个程序中,完全正确的是( )。A.includeB.include main(); main() {/*pr 以下四个程序中,完全正确的是( )。A.#include<stdio.h>B.#include<stdio.h> main(); main() {/*programming*/ {/*/programming/*/ printf("programming!\n");} printf("programming!\n");}C.#include<stdio.h>D.include<stdio.h> main() main() {/*/*programming*/*/ {/*programming*/ printf("programming!\n");} printf("programming!\n");}

为使*p=20,下面正确的程序是()A. include main( ) { int a=10,b=20,*p= printf 为使*p=20,下面正确的程序是 ( )A.# include<stdio.h> main( ) { int a=10,b=20,*p=&b; printf("%d\t%d\n",p,*p); } *p)B.# include<stdio.h> main( ) { int a=10,b=20,*p=b; printf("%d\t\%d\n",p,*p) }C.# include<stdio.h> main( ) { int a=10,b=20,*p; p=&a; p + +; printf("%d\t\%d\n",p,*p);} }D.# include<stdio.h> main( ) { int a=10,b=20,*p; *p=20; printf("%d\t\%d\n",p,*p); }

阅读下列程序,则在执行后,程序的运行结果为#include "stdio.h"#include "string.h"main(){ char a[30]="nice to meet you!";strcpy(a+strlen(a)/2,"you");printf("%s\n",a);}A.nice to meet you youB.nice toC.meet you youD.nice to you

以下四个程序中,完全正确的是()。A.include main( ); { /* programmlng* / printf( "p 以下四个程序中,完全正确的是( )。A.#include <stdio.h> main( ); { /* programmlng* / printf( "programming! \n" ); }B.#include <stdio.h> main( ) { /*/programming printf("programming! \n"); }C.#include <stdio.h> main( ) { /*programming* / printf( "programming! \n" ); }D.include <stdio.h> main ( ) { /*/* programming*/*/ printf( "programming! \n" ); }

当执行下面的程序时,如果输入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 main() {char*s1="abDuj"; char 下列程序的运行结果是( )。#include<stdio.h>#include<string.h>main(){ char*s1="abDuj";char*s2="ABdUG";int t;t=strcmp(s1,s2) ;printf("%d",t);}A.正数B.负数C.零D.不确定的值

有以下程序:include include main( ) {char a[ 7 ] = "a0 \0a0 \0";int i, 有以下程序:#include <stdio.h>#include <string.h>main( ) { char a[ 7 ] = "a0 \0a0 \0"; int i,j; i = sizeof(a); j = strlen(a); printf(" % d %d \n" ,i,j); }程序运行后的输出结果是( )。A.22B.76C.72D.62

有以下程序: 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

有下面程序段 #include"stdio.h" #include"string.h" main() { char a[3][20]={{"china"},{"isa"},{"bigcountry!"}}; chark[100]={0},*p=k; int i; for(i=0;i<3;i++) {p=strcat(p,a[i]);} i=strlen(p); printf("%d\n","i);} 则程序段的输出结果是A.18B.19C.20D.21

设有下列程序: include include main() { int i; char si 10],ti 10]; gets( 设有下列程序:include<stdio.h>include<string.h>main(){ int i;char si 10],ti 10];gets(t);for(i=0;i<2;i++){ gets(s);if(strcmp(t,s)<0)strcpy(t,s);}printf("%s\n",t);}程序运行后,从键盘上输入(<CR>代表回车符):CDEF<CR>BADEF<CR>QTHRG<CR>,则程序的输出结果是______。

以下程序的输出结果是#include "stdio.h"main(){ int a=065; printf("%d\n",--a);}

以下程序的输出结果是()。includeinclude main(){char str[12]={'s','t','r 以下程序的输出结果是( )。 #include <stdio.h> #include <string.h> main() { char str[12]={'s','t','r','i','n','g'}; printf("%d\n",strlen(str) ); }A.6B.7C.11D.12

有以下程序 include main() { char a=4; printf("%d/n,a=a 有以下程序 #include <stdio.h> main() { char a=4; printf("%d/n,a=a<<1); } 程序的运行结果是______。A.40B.16C.8D.4

以下程序:includeincludemain(){char str[]="abcd\n\123\xab";printf("%d" 以下程序: #include<stdio.h> #include<string.h> main() {char str[]="abcd\n\123\xab"; printf("%d",(str)); } 运行后的输出结果是( )。A.10B.9C.7D.14

有以下程序: include main( ){ int m =12,n=34;printf( "% d% d" ,m++ , ++n);printf( 有以下程序: #include <stdio.h>main( ){ int m =12,n=34; printf( "% d% d" ,m++ , ++n); printf("% d% d \n" ,n ++ , ++m); }程序运行后的输出结果是( )。A.12353514B.12353513C.12343514D.12343513

下列程序的输出结果是()。includeincludemain(){char a[]="\n123\\";printf 下列程序的输出结果是( )。 #include<stdio.h> #include<string.h> main() { char a[]="\n123\\"; printf("%d,%d\n",strlen(a),sizeof(a)); }A.5,6B.5,5C.6,6D.6,5

下列程序的输出结果是()。includeincludemain(){ char a[]="\n123\\";print 下列程序的输出结果是( )。#include<stdio.h>#include<string.h>main(){ char a[]="\n123\\"; printf("%d,%d\n",strlen(A) ,sizeof(A) );}A.5,6B.5,5C.6,6D.6,5

下面程序的运行结果是 ( ) 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.无确定值

以下4个程序中,完全正确的是A.#include stdio.h main(); {/*programming*/ printf("programming!\n");}B.#include stdio.h main(); {/*/ programming /*/ printf("programming!\n");}C.#include stdio.h main() {/*/*programming*/*/ printf("programming!\n");}D.include stdio.h main() {/*programming*/ printf("programming!\n");}

有以下程序include.main(){char*p="abcde\ofghjik\0";printf("%d\n",strlen(p));} 程 有以下程序 #include.<string.h> main() { char *p="abcde\ofghjik\0"; printf("%d\n",strlen(p)); } 程序运行后的输出结果是A.12B.15C.6D.5

下面程序段的输出为( )。 include "stdio.h" main { printf("%d\n",122); }A.0SXB 下面程序段的输出为( )。 #include "stdio.h" main { printf("%d\n",122); }A.0B.47C.48D.24

下列程序的输出结果是()。 include include main() {char a[]="\n123\\";pr 下列程序的输出结果是( )。 #include<stdio.h> #include<string.h> main() { char a[]="\n123\\"; printf ("%d,%d\n",strlen(a),sizeof(a)); }A.5,6B.5,5C.6,6D.6,5

以下四个程序中,完全正确的是______。A.include main(); {/*programming* 以下四个程序中,完全正确的是______。A.#include <stdio.h> main(); {/*programming*/ printf("programming!\n");}B.#inc lude<stdio.h> main() {/*/programming/*/ printf("programming!\n");}C.#include <stdio.h> main() {/*programming*/ printf("programming!\n");}D.include<stdio.h> main() {/*/*programming*/*/ printf("programming!\n");}

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

以下程序 include include main() { char*p1="abc",*p2="ABC",str[50]="xy 以下程序 #include<stdio.h> #include<string.h> main() { char*p1="abc",*p2="ABC",str[50]="xyz"; strcpy(ar+2,strcat(p1,p2)); printf("%s\n",str); } 的输出是______。A.xyzabcABCB.zabeABCC.yzabcABCD.xyabcABC

有以下程序:include include main(){char *p[10]={"abc","aabdfg","dcdbe" 有以下程序: #include <stdio.h> #include <string.h> main() { char *p[10]={"abc","aabdfg","dcdbe","abbd","cd"}; printf("%d\n",strlen(p[4])); } 执行后的输出结果是( )。A.2B.3C.4D.5

有以下程序:includeincludemain(){char str[][20]={"Hello","Beijing"},*P 有以下程序: #include <stdio.h> #include <string.h> main() { char str[][20]={"Hello","Beijing"},*P=str[0]; printf("%d\n",strlen(p+20)); } 程序运行后的输出结果是( )。A.0B.5C.7D.20