下列程序输出的结果是( )。 #include<stdio.h> fun1(char a,char b) char c;c=a;a=b;b=c; fun2(char*a,char b) char c;c=*a;*a=b;b=c; fun3(char*a,char*b) char c;c=*a;*a=*b;*b=c; void main() char a,b; a=’A’;b=’B’; fun1 (a,b);putchar( A: ;putchar( B: ; C: a=’
下列程序输出的结果是( )。 #include<stdio.h> fun1(char a,char b) char c;c=a;a=b;b=c; fun2(char*a,char b) char c;c=*a;*a=b;b=c; fun3(char*a,char*b) char c;c=*a;*a=*b;*b=c; void main() char a,b; a=’A’;b=’B’; fun1 (a,b);putchar( A: ;putchar( B: ; C: a=’
下列数组声明正确的是() A: char a[ ][ ]=new char[ ][3] B: char a[ ][ ]=new char[3][ ] C: char a[ ][ ][ ]=new char[ ][3][ ] D: char a[ ][ ][ ]=new char[3][ ][3]
下列数组声明正确的是() A: char a[ ][ ]=new char[ ][3] B: char a[ ][ ]=new char[3][ ] C: char a[ ][ ][ ]=new char[ ][3][ ] D: char a[ ][ ][ ]=new char[3][ ][3]
下列哪项声明的是指向函数的指针? A: char *p; B: char a,char &p=a; C: char (*p)(char *,char *); D: char *p[10];
下列哪项声明的是指向函数的指针? A: char *p; B: char a,char &p=a; C: char (*p)(char *,char *); D: char *p[10];
有以下程序 #include<stdio.h> sub1(char a,char B) char c;c=a;a=b;b=c; sub2(char *a,char B) char c;c=*a;*a=b;b=c; sub3(char *a,char *B) char c;c=*a;*a=*b;*b=c; main() cha,a,b; a=’A’;b=’B’;sub3(&a,&b) putchar( A: ;putchar( B: ; C: a=’A’;
有以下程序 #include<stdio.h> sub1(char a,char B) char c;c=a;a=b;b=c; sub2(char *a,char B) char c;c=*a;*a=b;b=c; sub3(char *a,char *B) char c;c=*a;*a=*b;*b=c; main() cha,a,b; a=’A’;b=’B’;sub3(&a,&b) putchar( A: ;putchar( B: ; C: a=’A’;
下列程序输出的结果是()。 #include<stdio.h> un1(char a,char b){char c;c=a;a=b;b=c;} fun2(char*a,char b){char c;c=*a;*a=b;b=c;} fun3(char*2,char*b){charc;c=*a;*a=*b;*b=c;} void main() { char a,b; a='A';b='B';funl(a,b);putchar(a);putchar(b); A: BABBAB B: ABBBBA C: ABBABA D: ABABBA
下列程序输出的结果是()。 #include<stdio.h> un1(char a,char b){char c;c=a;a=b;b=c;} fun2(char*a,char b){char c;c=*a;*a=b;b=c;} fun3(char*2,char*b){charc;c=*a;*a=*b;*b=c;} void main() { char a,b; a='A';b='B';funl(a,b);putchar(a);putchar(b); A: BABBAB B: ABBBBA C: ABBABA D: ABABBA
字符指针数组该如何定义? A: char *a[20]; B: char &a[20]; C: char *a[]; D: char *a;
字符指针数组该如何定义? A: char *a[20]; B: char &a[20]; C: char *a[]; D: char *a;
下列声明二维数组的语句不合法的是() A: char c[][] = new char[2][3]; B: char c[][]=new char[6][]; C: char[][] c= new char[3][3]; D: char [][] c = new char[][4];
下列声明二维数组的语句不合法的是() A: char c[][] = new char[2][3]; B: char c[][]=new char[6][]; C: char[][] c= new char[3][3]; D: char [][] c = new char[][4];
阅读下面程序:#include<iostream.h>void funl(char a,char b){ char c; c=a;a=b;b=C;}void fun2(char &a,char b){ char c; c=a;a=b;b=c;}void fun3(char &a,char &b){ char c; c=a;a=b;b=C;}void main(){ char a,b; a=’A’;b=’B’; funl(a,b);cout<<a<<b; a=’A’;b=’B’; fun2(a,b);cout<<a<<b; a=’A’;b=’B’; fun3(a,b);cout<<a<<b;} 则该程序的输出为 【15】 。
阅读下面程序:#include<iostream.h>void funl(char a,char b){ char c; c=a;a=b;b=C;}void fun2(char &a,char b){ char c; c=a;a=b;b=c;}void fun3(char &a,char &b){ char c; c=a;a=b;b=C;}void main(){ char a,b; a=’A’;b=’B’; funl(a,b);cout<<a<<b; a=’A’;b=’B’; fun2(a,b);cout<<a<<b; a=’A’;b=’B’; fun3(a,b);cout<<a<<b;} 则该程序的输出为 【15】 。
如何存储指针变量a的地址? A: char *a, **b; *b = &a; B: char *a, **b; **b = &a; C: char *a, **b; b = &a; D: char *a, **b; b = a;
如何存储指针变量a的地址? A: char *a, **b; *b = &a; B: char *a, **b; **b = &a; C: char *a, **b; b = &a; D: char *a, **b; b = a;
字符数组定义正确的是( ) A: char a[] B: char a[i] C: char a[5] D: char a[0]
字符数组定义正确的是( ) A: char a[] B: char a[i] C: char a[5] D: char a[0]