CVT网上笔试题和面试题答案及答案

时间:09-24编辑:佚名 招聘笔试题

【23xiu.com-爱上秀-教育信息门户网】

  14、答案(-29)

  1 #include

  2 #define fire(X,Y) (X)--;(Y)++;(X)*(Y);

  3 int main(){

  4 int a=3,b=4;

  5 for(int i=0;i<5;i++){fire(a,b);}

  6 printf("%d%d",a,b);

  7 scanf("%d",&a);

  8 }

  15、如下下列程序的答案(011122)

  1 #include

  2 void main(){

  3 int i;

  4 for(i=0;i<3;i++){

  5 switch(i){

  6 case 1:printf("%d",i);

  7 case 2:printf("%d",i);

  8 default :printf("%d",i);

  9 }

  10 }

  11 scanf("%d",&i);

  12 }

  16、下列网络协议在协议栈中排位最高的是(A)???

  A、TCP B、SMTP C、IEEE 802.11a D、Bluetooth

  17、C#中下列语句不能用于将Person类型转换为Student类型的是(AD)

  A、Person is Student B、 Person as Student C、Student stu1=(Student)Person D、Studnet.Convert(Person)

  18、写出下面程序运行的结果(false)

  1 public class exam {

  2 public static void main(String[] args) {

  3 String s1 = "Hello World";

  4 String s2 = new String("Hellow World");

  5 System.out.println(s1 == s2);

  6 }

  7 }

  19、下列关于数据库概念“关系”的陈述中 错误的是(B)

  A 表中任意两行的值不能相同  B 表中任意两列的值不能相同 C 行在表中的顺序无关紧要  D 列在表中的顺序无关紧要

  20、队列是一种(A)的线性表

  A、先进先出 B、先进后出 C、只能插入 D、只能删除

  21、常用的数据传输速率单位有:Kbps、Mbps、Gbps,1Gbps等于(A)

  A、1*10^3Mbps B、1*10^3Kbps C、1*10^6Mbps D、1*10^9Kbps

  22、 下列关于类的构造函数说法不正确的是(D )。

  A、构造函数名与类名相同 B、构造函数在说明类变量时自动执行 C、构造函数无任何函数类型 D、构造函数有且只有一个

  23、关于delete运算符的下列描述中,( C)是错误的。

  A、它必须用于new返回的指针; B、使用它删除对象时要调用析构函数; C、对一个指针可以使用多次该运算符; D、指针名前只有一对方括号符号,不管所删除数组的维数。

  24、用链表表示线性表的优点?(C)

  A 便于随机存取 B 花费的存储空间比顺序表少 C 便于插入与删除 D 数据元素的物理顺序与逻辑顺序相同

  25、模块A直接访问模块B的内部数据,则模块A和模块B的耦合类型为 (D) 。

  A.数据耦合 B.标记耦合 C.公共耦合 D.内容耦合

  笔记:当一个模块直接修改或操作另一个模块的数据,或者直接转入另一个模块时,就发生了内容耦合。此时,被修改的模块完全依赖于修改它的模块。如果发生下列情形,两个模块之间就发生了内容耦合。

  26、写出下列程序运行的结果(BAAAABCAAABCDAABCD)

  1 #include

  2 #include

  3 int main(){

  4 char str1[100]="BCD";

  5 char str2[100]="AAAAA";

  6 int i=0;

  7 for(i=1;i<=4;i++){

  8 memcpy(str2,str1,i);

  9 printf("%s",str2);

  10 }

  11 return 0;

  12 }

  27、写出下列程序运行的结果(compute)

  1 #include

  2 void main(){

  3 static char a[]="computer";

  4 static char b[]="computer";

  5 char *p=a;

  6 char *q=b;

  7 int j;

  8 for(j=0;j<7;j++){

  9 if(*(p+j)==*(q+j)){

  10 printf("%c",*(p+j));

  11 }

  12 }13 }

  28、写出下列程序运行的结果(4)

  1 class exam{

  2 public static void main(String []args) {

  3 int[] circle = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };

  4 int counter=0;

  5 int i=0,j=0;

  6 while(counter

  7 if(circle[i]!=-1){

  8 j++;

  9 if(j==3){

  10 counter++;

  11 if(counter==circle.length){

  12 System.out.println(circle[i]);

  13 break;

  14 }

  15 circle[i]=-1;

  16 j=0;

  17 }

  18 }

  19 i++;

  20 if(i>=circle.length){

  21 i=0;

  22 }

  23 }

  24

  25 }

  26 }

  29、(A)

  A、the application complies but doesn't print anything

  B 、the application complies and print "DONE WAITING";

  C 、the application complies and print "FINALLY";

  D 、the application complies and print "ALL DONE";

  1 public class Z{

  2 public static void main(String[] args){new Z();}

  3 private Z(){

  4 Z alias1=this;

  5 Z alias2=this;

  6 synchronized(alias1){

  7 try{

  8 alias2.wait();

  9 System.out.println("DONE WAITING");

  10 }

  11 catch(InterruptedException e){

  12 System.out.println("INTERR UPTED");

  13 }

  14 catch(Exception e){

  15 System.out.println("OTHER EXCEPTION");

  16 }

  17 finally{

  18 System.out.println("FINALLY");

  19 }

  20 }

  21 System.out.println("ALL DONE");

  22 }

  23 }

  30、输出712的N次方,结果后三位为696的N的个数,0

  1 #include

  2 int main(){

  3 int sum=712,count=0;

  4 for(int i=0;i<24669;i++)

  5 {

  6 sum=sum*712%1000;

  7 if(sum==696)

  8 count++;

  9 }

  10 printf("输出712的N次方,结果后三位为696的N的个数为:%d (0

  11 scanf("%d",&count);

  12 }

  31、输出下面的第三行的结果(1)

  public class exam{

  public static void main(String []args){

  String overview="This chapter contains a description of convertions used in this manual";

  for(int i=0;i

  int num=0;

  for(int j=0;j

  if(overview.charAt(i)==overview.charAt(j))

  num++;

  }

  System.out.println(num);

  }

  }

  }

  32、输出下面程序的结果:

  dog

  cat

  boy

  apple

  1 public class exam{

  2 public static void main(String []args){

  3 String overivew="apple boy cat dog";

  4 String[] arr=overivew.split(" ");

  5 int len=arr.length;

  6 for(int i=1;i<=len;i++){

  7 System.out.println(arr[len-i]+" ");

  8 }

  9 }

  10 }

  33、为了使索引键的值在基本表中唯一,在建立索引语句中应使用保留字(A)

  A、 UNIQUE B、COUNT C、DISDINCT D、UNION

  34、苹果ios操作系统上的应用开发语言是(C)

  A、C B、C++ C、Objective c D、java E、Python

  35、Android的IPC(进程通讯)主要采用以下哪个?(C)

  A、Socket B、Pipe C、Binder D、Signal

  36、不属于构造函数特征的是(D)

  A、构造函数的函数名与类名同名 B、构造函数可以重载 C、构造函数可以设置缺省(默认)参数 D、构造函数必须指定类型说明

123
【猜你喜欢】 【为你推荐】