若有char st[20]="hello "; ,则执行printf("%d,%d ",strlen(st),sizeof(st)); 后的输出结果为()
6,20
举一反三
- 以下程序的输出结果是:( )。 main() { char st[20]="hello\0\t\\"; printf("%d%d\n",strlen(st),sizeof(st)); }
- 以下程序的输出结果()。void main(){ char st[20]="hello\073\\\n"; printf("%d",strlen(st));} A: 5 B: 7 C: 8 D: 9
- 以下程序的输出结果______。 main() { char st[20]="he11\O\t\"; printf("%d%d\n",str1en(st),sizeof(st)); } A: 99 B: 520 C: 1320 D: 2020
- 以理程序的输出结果()。 main() char st[20]="he11\O\t\\"; printf("%d%d\n",str1en(st),sizeof(st)); A: 99 B: 520 C: 1320 D: 2020
- 中国大学MOOC: 下面程序输出结果为:#include<iostream>using namespace std;#include<string.h>int main( ){ char st[20]="hello\0\t\\"; cout<<strlen(st); cout<<sizeof(st)<<endl; cout<<st; return 0;}
内容
- 0
若有以下定义,则printf语句的输出结果为。 struct student { int a; double b; }st; printf("%d ",sizeof(st));
- 1
static char st[]={"C Language"};不能写为: char st[20]; st={"C Language"};
- 2
若有以下定义,st已赋初值,则printf语句的输出结果是。 struct student { int num; char name[20]; }st={1001,"Jack"}; printf("%d,%s ",st);
- 3
f(st): st[]=st={:,:} f(st) (st[],st[]) 结果是
- 4
下面程序输出结果为:#includeiostreamusing namespace std;#includestring.hint main( ){ char st[20]=hello\0\t\\; coutstrlen(st); coutsizeof(st)endl; coutst; return 0;} A: 520hello B: 1220hello\0\t C: 520hello\t D: 1120hello└┘└┘