亚信校园招聘笔试题
亚信科技笔试题答案

亚信科技笔试题答案一、选择题1. 在计算机系统中,用于表示数据地址的数字是()。
A. 奇数B. 偶数C. 内存地址D. 逻辑地址答案:D2. 下列哪个选项不是操作系统的基本功能?()。
A. 文件管理B. 设备管理C. 数据加密D. 进程管理答案:C3. 网络协议TCP/IP中,负责传输层数据传输的是()。
A. IPB. TCPC. UDPD. ICMP答案:B4. 在关系型数据库中,用于创建表的SQL语句是()。
A. SELECTB. INSERTC. CREATE TABLED. UPDATE答案:C5. 以下哪种数据结构是线性表的物理存储方式?()。
A. 链式存储B. 索引存储C. 顺序存储D. 哈希存储答案:C二、填空题1. 在面向对象编程中,______和______是类的三个基本特性之一,它们保证了对象的状态和行为的封装和隐藏。
答案:继承、多态2. HTTP协议是无状态的,通常使用______和______来实现用户会话状态的管理。
答案:Cookies、Session3. 在软件开发过程中,______模式是一种常用于处理多个对象之间交互的模式,它可以将对象之间的耦合度降到最低。
答案:观察者模式三、简答题1. 请简述软件开发过程中的需求分析阶段的主要任务。
答:需求分析阶段的主要任务是明确软件系统的功能和性能要求,包括识别用户的需求、系统的性能指标、操作环境等。
此阶段需要与用户进行充分的沟通,确保需求的完整性和准确性,并通过需求规格说明书等形式进行文档化,为后续的软件设计和开发打下基础。
2. 描述数据库事务的四个基本特性,并举例说明。
答:数据库事务的四个基本特性是原子性(Atomicity)、一致性(Consistency)、隔离性(Isolation)和持久性(Durability)。
原子性指事务中的所有操作要么全部完成,要么全部不完成,不会出现只完成部分操作的情况。
一致性指事务必须使数据库从一个一致性状态变换到另一个一致性状态,保证数据库中的数据满足所有的完整性约束。
亚信笔试题

亚信笔试题亚信公司招聘笔试题目一、选择题(每题2分,共20分)1. 在C语言中,下列哪个选项是正确的字符串定义方式?A. char str[10] = "Hello";B. char *str = "Hello";C. char str[] = {'H', 'e', 'l', 'l', 'o', '\0'};D.以上全是2. 计算机网络中,HTTP协议通常使用哪个端口进行通信?A. 21B. 25C. 80D. 1103. 以下关于数据库事务的描述,哪一项是错误的?A. 事务具有原子性;B. 事务具有一致性;C. 事务具有持久性;D. 事务具有逆变性;4. 在软件开发过程中,哪种设计模式可以处理对象间的多对多关系?A. 单例模式B. 工厂模式C. 观察者模式D. 适配器模式5. 下列哪个算法不属于动态规划算法?A. 斐波那契数列B. 背包问题C. 最长公共子序列D. 二分查找6. 在Java中,final关键字的作用是什么?A. 声明常量B. 声明抽象方法C. 限制方法被重写D. 限制变量只能被赋值一次7. 以下哪个操作系统是开源的?A. WindowsB. MacOSC. LinuxD. Unix8. 软件工程中,哪个过程负责定义软件的功能性和非功能性需求?A. 需求分析B. 设计C. 实现D. 测试9. 在HTML中,用于插入图像的标签是什么?A. <img>B. <image>C. <picture>D. <graphic>10. 数据结构中,二叉搜索树的特点是什么?A. 节点的左子树只包含小于当前节点的数B. 节点的右子树只包含大于当前节点的数C. A和B都对D. A和B都错二、简答题(每题10分,共30分)11. 请简述面向对象编程中的三个基本特性。
亚信科技java笔试题

亚信科技java笔试题亚信科技Java笔试题参考内容在亚信科技的Java笔试中,可能会涉及到以下几个主题:面向对象编程、异常处理、多线程、集合和泛型、IO流操作等。
以下是对这些主题的详细参考内容。
1. 面向对象编程:面向对象编程是Java的核心概念之一。
面向对象编程的关键特性包括封装、继承和多态。
- 封装:封装是将数据和操作方法封装在一个类中,通过公共的方法来访问和操作数据,隐藏类的内部实现细节。
示例代码:```javapublic class Person {private String name;private int age;public String getName() {return name;}public void setName(String name) { = name;}public int getAge() {return age;}public void setAge(int age) {this.age = age;}}```- 继承:继承是通过子类继承父类的属性和方法,实现代码的重用和扩展。
子类可以继承父类的公共方法、属性和构造方法。
示例代码:```javapublic class Student extends Person {private String school;public String getSchool() {return school;}public void setSchool(String school) {this.school = school;}}```- 多态:多态是指通过父类的引用变量来调用子类的方法,实现动态绑定。
它可以提高代码的灵活性和重用性。
示例代码:```javapublic class Animal {public void sound() {System.out.println("Animal makes sound");}}public class Dog extends Animal {@Overridepublic void sound() {System.out.println("Dog barks");}}public class Cat extends Animal {@Overridepublic void sound() {System.out.println("Cat meows");}}public class Main {public static void main(String[] args) {Animal animal = new Animal();Animal dog = new Dog();Animal cat = new Cat();animal.sound(); // 输出 "Animal makes sound" dog.sound(); // 输出 "Dog barks"cat.sound(); // 输出 "Cat meows"}}```2. 异常处理:在Java中,异常处理是通过try-catch语句块来实现的。
亚信联创初试笔试题(A)

考评笔试题一、技术题(60分)1、(5分)请用代码来描述什么是重载(Overload)?什么是重写(Override)?2、(5分)List<String> 转换为String[]常用方法有?3、(5分)select deptID from Dept where deptID = 1 group by deptID order by deptID 的查询顺序?4、(5分)在用集合存储数据时,什么情况下使用HashMap(),什么情况下使用LinkedHashMap()?5、(5分)在eMan系统中,请用代码获取TOMCAT的路径?6、(5分)使用ajax时,都需要xmlhttprequest对象获得返回值,在IE中如何创建xmlhttprequest对象?7、(5分)项目开发中,什么情况下使用静态变量?什么情况下使用非静态全局变量?8、(5分)在eMan系统中所有跳转都使用了forward,它与redirect的区别是什么?9、(10分)SqlServer 2005,表名:t_node,如右图请用你认为最优的代码显示出父节点“a”下所有子节点。
已知条件:parent=“a”10、(10分)SqlServer 2005,表名:OperationActualHours,human请用你认为最优的代码显示如下格式数据,已知条件:operationID in (44,45)关于第9和10题,任何语言都可以,但一定是你自己认为最优的代码,并说说为什么要这样实现?二、开放题(40分)11、你认为较半年前自己最大的进步是什么?你对自己目前的工作效率满意吗?为什么?12、你目前学习的新技术是什么?为什么要学习它?13、在你目前负责的项目中,你最想改变的是什么?为什么?具体改变的步骤是什么?14、请给自己在半年内的表现打个分(满分100);你如何在下半年提高这个分数?。
亚信笔试题B卷以及答案修订稿

亚信笔试题B卷以及答案WEIHUA system office room 【WEIHUA 16H-WEIHUA WEIHUA8Q8-亚信联创科技校园招聘B卷考试时间 60_分钟 _ 考试方式(闭)卷第一部分——计算机基础一、选择题(每题2分,总分40分)1.CPU状态分为目态和管态两种,什么是从目态转换到管态的唯一途径 ( D )A.运行进程修改程序状态字B.进程调度程序C.中断屏蔽D.中断2.引入多道程序设计的目的是( C )A.增强系统的用户友好性B.提高系统实用性C.充分利用CPUD. 扩充内存容量3.Windows系统是一个(B )操作系统。
A、单用户单系统B、单用户多任务C、多用户单任务D、多用户多任务4.在半导体存储器中,动态随机存储器DRAM的特点是(D )。
A、按位结构方式存储B、按字结构方式储存C、信息在储存介质中移动D、每隔一定时间进行一次刷新5.单地址指令的格式是由( B)构成。
A、操作码和操作数地址B、操作码和原操作数地址C、操作码和目的操作数地址D、操作码和下一条指令地址6.八进制数76转换为二进制数为(C )A、110111B、111101C、111110D、1111117.80486型号的微处理器能同时处理的二进制位数是(C )位。
A、8B、16C、32D、648.下面关于串的的叙述中,哪一个是不正确的(B )A.串是字符的有限序列B.空串是由空格构成的串C.模式匹配是串的一种重要运算D.串既可以采用顺序存储,也可以采用链式存储9.若串S1=‘ABCDEFG’, S2=‘9898’ ,S3=‘###’,S4=‘012345’,执行concat(replace(S1,substr(S1,length(S2),length(S3)),S3),substr(S4,index(S2,‘8’),length(S2)))其结果为()A.ABC###G0123B.ABCD###2345C.ABC###G1234D.ABCD###123410.设有两个串p 和q,其中q 是p 的子串,求q 在p 中首次出现的位置的算法称为(C )A.求子串 B.联接 C.匹配 D.求串长11. 下列字符中,ASCII码值最大的是 ( D )。
亚信笔试题正常

第一部分JAVA语言基础一、选择题1、若所用变量都以正确定义,一下选项中,非法的表达式是CA a!=4||b==1B‘a’%3C‘a’=1/2D‘A’+322、下列语句序列执行后,j的值是A5B6C7D83、java语言的类间的继承关系是BA多重的B单重的C线程的D不能继承4、下列定义中,不正确的是 CA class x{…}B class x extends y {…}C static class x implements y1,y2{…}D public class x extends Applet{…}5、定义java Applet程序时,必须有的import语句是AA import java.applet.Applet;B import java.io.*C import java.awt.event;D import ng.*;6、下列方法定义中,不正确的是DA public int x( ){…}B public static int x(double y){…}C void x (double d){…}D public static x (double a){…}7、下列的哪个选项可以正确表达八进制8 CA0x8B0x10C08D0108、下列关于继承的哪项叙述是正确的CA在java中允许多重继承B在java中一个类只能实现一个接口C在java中一个类不能同时继承一个类和实现一个接口D java的单一继承使代码更可靠字串19、若已定义byte[]x={11,22,33,-66};其中0<=k<=3,则对x数组元素错误的引用时cA x[5-3]B x[k]C x[k+5]D x[0]10、给出下列代码,如何是成员变量m被方法fun()直接访问 -----成员变量在类中定义,局部变量在方法中定义 CClass test{Private int m;Public static void fun(){…}}A将private int m 改为 protected int mB将private int m 改为 public int mC将private int m 改为 static int mD将 private int m 改为 int m11、Given: F1public class Alphal{2public static void main(String[] args){3boolean flag; int i=0;1do{2flag = false;3system.out.println(i++);4flag = 1 < 105continue;6}while((flag)?True;false);7}8}What is result?A0000000000B0123456789C Compilation failsD The code runs with no output.E The code enters an infinite loopF An exception is thrown at runtime e.12、Given() D1package foo;23 import java.Util.Vector;45protected class MyVector Vector{6int i=1;7public MyVector()8i=2 ;9}10}1112public class MyNewVector extends MyVector{13public MyNewVector(){14i=4;15}16public static void main(String args[]){17MyVector v=new MyNewVector18}19}what is the result?()A. Compilation succeedsB. Compilation falis because of an error at line5C. Compilation falis because of an error at line6D. Compilation falis because of an error at line14E. Compilation falis because of an error at line1713、Given:()1class Super{2public integer getlength(){3return new integer(4);}}45public class Sub extends Super}6public Long GetLength(){return new Long(5);}78public static void main(String[] args){9Super sooper = new Super();10Sub sub = new Sub();11System.out.println(12sooper.getLength().toString()+","+13sub.getLength().toString() );14}15}What is the output?A.4,4B.4,5C.5,4D.5,5pilation fails.14、Given:1 public class Test{2 public static String output=....;34 public static void foo (int){5 try{6 if(i==1){7 throw new Exception();8 }9 output+="2";10 }11 Catch(Exception e){12 OutPut+="1";13 Return;14 }15 Finally{16 Output+="3";17 }18 Output+="4"19 }2021 Public static void main(string args[]){22 Foo(0);23 Foo(1);2425 }26 }What is the value of the variable output at line 23?15、Given:() D1 class Base{2 Base(){System.out.print("Base");}3 }4 public class Alpha extends Base{5 public static void main(String []args){6 new Alpha();7 new Base();8 }9 }What is the result?A. BaseB. Basebasec. Compilation fails.D. The code runs with no output.E. An exception is thrown at runtime.16、Given:1 int l=1,j=-1;2 switch(i){3 case 0,1:j=1;4 case 2;j=2;5 default;j=0;6 }7 System.out.println("j="+j);What is the result?A.j=-1B.j=0C.j=1D.j=2pilation fails.---------------17、Which two are valid declarations within an interface definition?(Choose two)A. void methoda();B. public double methoda();C. public final double methoda();D. static void methoda(double dl);E. Protected void methoda(double dl);18、Which two allow the class Thing to be instantiated using new Thing()? (Choose two)A. public class thing{}B. public class thing{public thing(){}}C. public class thing{public thing(void){}}D. public class thing{public thing(String s){} }E. public class thing{public thing(){} public thing(String s){} }19、Given:1 public class X{2 public static void main(String[] args){3 try{4 badMethod()5System.out.print(“A”);6}7catch (Exception ex){8System.out.print(“B”);9}10Finally{11System.out.print(“C”);12}13System.out.print(“D”);14}15public static void badMethod(){16throw new RuntimeException();17}18}What is the result?A.ABB.BCC.ABCD.BCDpilation fails20、 Given:1class TestA{2TestB b;3TestA() {4 b = new testB(this);5}6}7class TestB {8TestA a;9TestB(TestA a){10this.a = a;11}12}13Class TestA11 {14public static void main (String args[]){15new TestA11().makeThings();16//…code continues on17}18void makeThings(){19TestA test = new TestA();20}21}Which two statements are true after line 15 before main completes?(Choose two)A.Line 15 causes a stack overflow.B.An exception is thrown at runtime.C.The object referenced by a is eligible for garbage collection.D.The object referenced by b is eligible for garbage collection.E.The object referenced by a is not eligible for garbage collection.F.The object referenced by b is not eligible for garbage collection.二、简答题(共6题,每题5分,共30分)1、java中作用域public,private,protected以及不写时的区别2、列出java中所有基本数据类型,并说明这些数据类型占用的字节数?同时说明基本数据类型和其他类型在使用上的区别?3、请详细阐述static在java中的应用?4、请阐述抽象类、继承、接口的概念及相互关系?5、Try{ }里有一个return语句,那么紧跟在这个try后的finally{ }里的code会不会被执行,什么时候被执行,在return前还是后?6、GC是什么?为什么要有GC。
亚信校招笔试题目

1.BSTpublicclassBSTMinLength{publicstaticvoidmain(String[]args){TreeNodetNode11=newTreeNode(10,null,null); TreeNodetNode12=newTreeNode(50,null,null); TreeNodetNode13=newTreeNode(5,null,null); TreeNodetNode14=newTreeNode(30,null,null); TreeNodetNode21=newTreeNode(30,tNode11,tNode12); TreeNodetNode22=newTreeNode(30,tNode13,tNode14); TreeNodetNodeRoot=newTreeNode(100,tNode21,tNode22);}privatestaticintminlength(TreeNodetNode){if(tNode!=null){returngetlength(tNode,0);}return-1;}privatestaticintgetlength(TreeNodetNode,intcurLength){ intminLeft=-1;intminRight=-1;if(tNode.leftNode!=null){minLeft=getlength(tNode.leftNode,curLength+tNode.value);}if(tNode.rightNode!=null){minRight=getlength(tNode.rightNode,curLength+tNode.valu e);}if(tNode.leftNode==null&&tNode.rightNode==null){returncurLength+tNode.value;}if(tNode.leftNode==null){returnminRight;}if(tNode.rightNode==null){returnminLeft;}returnminLeft>minRight?minRight:minLeft;}}classTreeNode{intvalue;TreeNodeleftNode;TreeNoderightNode;TreeNode(intvalue,TreeNodelefeNode,TreeNoderightNode){this.value=value;this.leftNode=lefeNode;this.rightNode=rightNode;}}2.lru#include<iostream>usingnamespacestd;intlruCountMiss(intmax_cache_size,int*pages,intlen) {intcount=0;inti,j,k,n;boolflag=false;int*a=newint[max_cache_size];//初始化高速缓存数组for(i=0;i<max_cache_size;i++){a[i]=-1;}for(j=0;j<len;j++){for(i=0;i<max_cache_size;i++){if(pages[j]!=a[i]){continue;}else{break;}}if(i!=max_cache_size){for(k=i;k<max_cache_size;k++) {if(a[k]==-1){flag=true;break;}}if(!flag){for(n=i;n<max_cache_size-1;n++) {a[n]=a[n+1];}a[max_cache_size-1]=pages[j]; }else{flag=false;for(n=i;n<k-1;n++){a[n]=a[n+1];}a[k-1]=pages[j];}}else{count++;for(i=0;i<max_cache_size;i++) {if(a[i]==-1){a[i]=pages[j];flag=true;break;}}if(!flag){for(i=0;i<max_cache_size-1;i++) {a[i]=a[i+1];}a[max_cache_size-1]=pages[j];}elseflag=false;}}returncount;}intmain(){intarr[]={7,0,1,2,0,3,0,4};cout<<lruCountMiss(3,arr,8)<<endl; return0;}3.反转链表lnode*reverse(lnode*head){if(head){lnode*prev=NULL;lnode*curr=head;lnode*next=curr->next;curr->next=prev;while(next!=NULL){prev=curr;curr=next;next=next->next;curr->next=prev;}returncurr;}else{returnhead;}};lnode*reverseLinkedList(lnode*list){ if(list){lnode*ori=list;lnode*half=list;lnode*prev=list;while(list&&half&&half->next){prev=list;list=list->next;half=half->next;if(half){half=half->next;}if(list){prev->next=reverse(list);}returnori;}returnlist;}4.SJFfloatwaitingTimeSJF(int*requestTimes,int*durations,intn ){int*flags=newint[n];floatsums=0;for(inti=0;i<n;i++){flags[i]=-1;}intnowtime=0;for(inti=0;i<n;i++){intcount=0;for(intk=0;k<n;k++){if(count==0){if(requestTimes[k]<=nowtime&&durations[k]>=0){flags[count++]=k;}else{if(durations[k]>=0&&requestTimes[k]<=nowtime){ if(durations[k]<durations[flags[0]]){count=1;flags[0]=k;}elseif(durations[k]==durations[flags[0]]){ flags[count++]=k;}}}}if(count==0){count=1;for(intj=0;j<n;j++){if(durations[j]>=0){flags[0]=j;nowtime=requestTimes[j];}}}intidx=flags[0];intminreq=requestTimes[flags[0]];intmindrus=durations[idx];if(count>1){for(intj=1;j<count;j++){if(requestTimes[flags[j]]<minreq){ minreq=requestTimes[flags[j]];idx=flags[j];}}}sums+=nowtime-requestTimes[idx]; nowtime+=durations[idx];requestTimes[idx]=-1;durations[idx]=-1;}returnsums/n;}5无向连通判断是否为树#include<stdio.h>#include<stdlib.h>#include<string.h>constintN=10000,M=100000;booledge[N][N];//数组记录两点是否存在边boolvisit[N];//标记该节点是否访问过boolDFS_check(intx,inty=-1){if(visit[x])returnfalse;visit[x]=true;inti;for(i=0;i<N;i++)if(edge[x][i]&&i!=y)if(visit[i])returnfalse;elseif(!DFS_check(i,x))returnfalse;returntrue;}intmain(){intn,m;scanf("%d%d",&n,&m);memset(edge,false,sizeof(edge)); inti,x,y;for(i=0;i<m;i++){scanf("%d%d",&x,&y);edge[x-1][y-1]=true;edge[y-1][x-1]=true;}memset(visit,false,sizeof(visit)); boolresult=DFS_check(0);if(result)for(i=0;i<n;i++)if(!visit[i])result=false;if(result)printf("Yes!\n");elseprintf("No!\n");system("pause");return0;}6.老鼠奶酪#include<iostream> usingnamespacestd;intisPath(int**grid,intm,intn); struct_TraversedNode{intx;inty;_TraversedNode*next;};struct_Node{intx;inty;};intmain(intargc,constchar*argv[]){int**grid=newint*[8];for(inti=0;i<8;i++){grid[i]=newint[8];}grid[0][0]=1;grid[0][1]=1;grid[0][2]=0;grid[0][3]=0;gri d[0][4]=0;grid[0][5]=0;grid[0][6]=0;grid[0][7]=1;grid[1][0]=1;grid[1][1]=1;grid[1][2]=1;grid[1][3]=1;gri d[1][4]=1;grid[1][5]=1;grid[1][6]=1;grid[1][7]=1;grid[2][0]=1;grid[2][1]=0;grid[2][2]=0;grid[2][3]=0;gri d[2][4]=1;grid[2][5]=0;grid[2][6]=0;grid[2][7]=1;grid[3][0]=1;grid[3][1]=1;grid[3][2]=1;grid[3][3]=0;gri d[3][4]=1;grid[3][5]=0;grid[3][6]=0;grid[3][7]=1;grid[4][0]=0;grid[4][1]=1;grid[4][2]=0;grid[4][3]=0;gri d[4][4]=1;grid[4][5]=1;grid[4][6]=1;grid[4][7]=1;grid[5][0]=0;grid[5][1]=1;grid[5][2]=0;grid[5][3]=0;gri d[5][4]=0;grid[5][5]=0;grid[5][6]=0;grid[5][7]=1;grid[6][0]=0;grid[6][1]=1;grid[6][2]=0;grid[6][3]=9;gri d[6][4]=1;grid[6][5]=1;grid[6][6]=1;grid[6][7]=1;grid[7][0]=0;grid[7][1]=1;grid[7][2]=1;grid[7][3]=1;gri d[7][4]=0;grid[7][5]=0;grid[7][6]=1;grid[7][7]=0;for(inti=0;i<8;i++){for(intj=0;j<8;j++)cout<<grid[i][j]<<"";;cout<<endl;}returnisPath(grid,8,8);}intisPath(int**grid,intm,intn)if(grid[0][0]==0)return0;if(grid[0][0]==9)return1;intstep=0;boolflag_down_success=true;boolflag_up_success=true;boolflag_left_success=true;boolflag_right_success=true;_TraversedNode*p=NULL;_TraversedNode*p_check=NULL;_TraversedNode*head=NULL;_TraversedNode*TraversedNode=new_TraversedNode; TraversedNode->x=0;TraversedNode->y=0;head=TraversedNode;p=TraversedNode;p->next=NULL;intcount_node=0;intnum_node=1;_Node*node=new_Node[n+m];_Node*node_next=new_Node[n+m];node[0].x=0;node[0].y=0;while(1)for(inti=0;i<num_node;i++){if(node[i].x+1<=m-1){if(grid[node[i].x+1][node[i].y]!=0){if(grid[node[i].x+1][node[i].y]==9){step++;cout<<"可以最短"<<step<<"步到达终点"<<endl;return1;}p_check=head;while(p_check!=NULL){if((p_check->x==node[i].x+1)&&(p_check->y==node[i].y)) {p_check=NULL;flag_down_success=false;}else{p_check=p_check->next;}if(flag_down_success){TraversedNode=new_TraversedNode; TraversedNode->x=node[i].x+1; TraversedNode->y=node[i].y;p->next=TraversedNode;p=TraversedNode;p->next=NULL;node_next[count_node].x=node[i].x+1; node_next[count_node].y=node[i].y; count_node++;}flag_down_success=true;}}if(node[i].x-1>=0){if(grid[node[i].x-1][node[i].y]!=0) {if(grid[node[i].x-1][node[i].y]==9) {step++;cout<<"可以最短"<<step<<"步到达终点"<<endl;return1;}p_check=head;while(p_check!=NULL){if((p_check->x==node[i].x-1)&&(p_check->y==node[i].y)) {p_check=NULL;flag_up_success=false;}else{p_check=p_check->next;}}if(flag_up_success){TraversedNode=new_TraversedNode;TraversedNode->x=node[i].x-1;TraversedNode->y=node[i].y;p->next=TraversedNode;p=TraversedNode;p->next=NULL;node_next[count_node].x=node[i].x-1;node_next[count_node].y=node[i].y;count_node++;}flag_up_success=true;}}if(node[i].y+1<=n-1){if(grid[node[i].x][node[i].y+1]!=0){if(grid[node[i].x][node[i].y+1]==9){step++;cout<<"可以最短"<<step<<"步到达终点"<<endl;return1;}p_check=head;while(p_check!=NULL){if((p_check->x==node[i].x)&&(p_check->y==node[i].y+1)) {p_check=NULL;flag_right_success=false;}else{p_check=p_check->next;}}if(flag_right_success){TraversedNode=new_TraversedNode; TraversedNode->x=node[i].x; TraversedNode->y=node[i].y+1;p->next=TraversedNode;p=TraversedNode;p->next=NULL;node_next[count_node].x=node[i].x; node_next[count_node].y=node[i].y+1; count_node++;}flag_right_success=true;}}if(node[i].y-1>=0){if(grid[node[i].x][node[i].y-1]!=0){if(grid[node[i].x][node[i].y-1]==9){step++;cout<<"可以最短"<<step<<"步到达终点"<<endl;return1;}p_check=head;while(p_check!=NULL){if((p_check->x==node[i].x)&&(p_check->y==node[i].y-1)) {p_check=NULL;flag_left_success=false;}else{p_check=p_check->next;}}if(flag_left_success){TraversedNode=new_TraversedNode;TraversedNode->x=node[i].x;TraversedNode->y=node[i].y-1;p->next=TraversedNode;p=TraversedNode;p->next=NULL;node_next[count_node].x=node[i].x; node_next[count_node].y=node[i].y-1; count_node++;}flag_left_success=true;}}}if(count_node==0){cout<<"不存在到达终点的路径"<<endl; return0;break;}step++;num_node=count_node;count_node=0;for(inti=0;i<num_node;i++){node[i].x=node_next[i].x;node[i].y=node_next[i].y;cout<<"("<<node[i].x<<","<<node[i].y<<")";}cout<<endl;}}7.格雷码public?static?int?gray(byte?term1,byte?term2){ int?n=0;for(int?i=0;i<8;i++){byte?t1,t2,ch;ch?=?(byte)0x01;t1=term1&ch;t2=term2&ch;if((t1^t2)==ch){n++;}term1=(byte)(term1>>1);term2=(byte)(term>>1);}if(n==1)return?1;elsereturn0;}8.#include<iostream>usingnamespacestd;voidmyPrint(intn){if(1==n){cout<<"1*2"<<endl;return;}intlastnumber=n*(n+1);//每一行最后一个数intfirst=1;//每一行第一个数intnum=1;intstep=n;for(inti=1;i<=n;i++){for(intj=1;j<i;j++)//输出‘-’cout<<'-';num=first;for(intl=0;l<(n-i+1);l++)//每一行的前半部分{cout<<num<<"*";num++;}num=lastnumber-step+1;cout<<num;num++;for(l=0;l<(n-i);l++)//每一行的后半部分{cout<<"*"<<num;num++;}cout<<endl;//修改first和lastnumberfirst=first+step;lastnumber=lastnumber-step;step--;}}intmain(){intn;while(cin>>n){myPrint(n);}return0;}9短作业优先调度算法(SJF)publicclassShortJobFirst{publicstaticvoidmain(String[]args){int[]requestTimes={0,2,4,5};int[]durations={7,4,1,4};floataverageWaitingTime=ShortJobFirst.minWaitingTime(re questTimes,durations);}/****@paramrequestTimes任务提交时间*@paramdurations任务服务时间*@return*/publicstaticfloatminWaitingTime(int[]requestTimes,int[] durations){if(requestTimes==null||durations==null)return-1;if(requestTimes.length!=durations.length)return-1;intn=requestTimes.length;int[]durationTimes=copyArray(durations);//复制一份服务时间int[]startTimes=newint[n];//开始时间int[]endTime=newint[n];//结束时间int[]waitingTime=newint[n];//等待时间int[]cycleTime=newint[n];//周转时间//第一个执行任务的开始时间、结束时间、等待时间startTimes[0]=requestTimes[0];endTime[0]=startTimes[0]+durations[0];waitingTime[0]=0;/**核心代码**/intlastIndex=0;//上一次执行任务的索引intminIndex=0;//最短任务的索引for(inti=1;i<n;i++){minIndex=getMinIndex(durations);//作曲最短任务索引为当前任务startTimes[minIndex]=endTime[lastIndex];//当前任务的开始时间为上一个任务的结束时间endTime[minIndex]=startTimes[minIndex]+durationTimes[mi nIndex];//结束时间=开始时间+服务时间waitingTime[minIndex]=startTimes[minIndex]-requestTimes[minIndex];//等待时间=开始时间-提交时间cycleTime[minIndex]=endTime[minIndex]-requestTimes[minIndex];//周转时间=结束时间-提交时间lastIndex=minIndex;//更新当前任务索引为下一次循环中的“上一次任务索引”}//计算平均等待时间ints=0;for(inti:waitingTime)s+=i;floataverageTime=(float)s/(float)n;returnaverageTime;}//获取最短任务索引,获取完成之后,该任务的服务时间置为最大值,从下一次寻找最短任务的过程中排除。
亚信校园招聘笔试题

亚信科技2008年度校园招聘笔试院校名:系别:专业:姓名:性别:应聘地点:□长春□呼和浩特(请选择)手机:Part 1: 个性调查1.T 业分很多门类,按行业分比如软件、电子通信、系统集成等,以软件为例,具体又可以细分为开发、测试、售前方案、咨询等多种。
请描述本人的个性和技术方面的兴趣特长,并结合自己的兴趣为自己设定一个发展目标(简而言之,就是自我感觉在IT业更适合从事什么方面的工作)。
2.请如实回答下面问题。
以下测试仅为表现一个人的个性,无标准答案,仅供参考1) 要是你与同事由于一些问题产生了矛盾,关系紧张起来,这时你将怎么办?A.他若不理我,我也不理他;他若主动前来招呼我,那么我也招呼他。
B.请别人帮助,调解我们之间的紧张关系。
C.从此不再搭理他,并设法报复他。
D.我将主动去接近对方,争取消除矛盾。
2) 如果你被别人错误地认定为干过某一件不好的事情,你将怎么办?A.找这些乱说的人对质,指责他们。
B.同样捏造一些莫须有的事加在对方身上,进行报复。
C.置之一笑,不去理睬,让时间来证明自己的清白。
D.要求组织上调查,以弄清事实真相。
3) 如果你的两个领导人之间关系紧张,你将怎么办?A.哪一边得势就倒向哪一边。
B.采取不介入态度,明哲保身,不得罪任何人。
C.哪一个领导人正确就站在哪一边,态度明确。
D.努力调解两位领导人之间的矛盾。
4) 如果你的好朋友和你发生了严重的意见分歧,你将怎么办?A.暂时避开这个问题,以后再说,以求同存异。
B.请与我和他都亲近的第三者来裁决谁是谁非。
C.为了友谊,迁就对方,放弃自己的观点。
D.下决心中断我们之间的朋友关系。
5) 当别人妒嫉你所取得的成绩时,你将怎么办?A.以后再也不冒尖了,免得被人妒嫉。
B.走自己的路,不管别人持什么态度看待我。
C.同这些妒嫉者争吵,保护自己的名誉。
D.一如即往地工作,但同时注意反省自己的行为。
6) 如果工作需要你去处理某一件事,而处理这件事的结果不是得罪甲,就是得罪乙,而甲和乙恰恰又都是你的好朋友,你将怎么办?A.向甲和乙讲明这件事的性质,想办法取得他们的谅解,再处理这件事情。
亚信校招笔试题目

public class BSTMinLength {public static void main(String[] args) {TreeNode tNode11 = new TreeNode(10, null, null);TreeNode tNode12 = new TreeNode(50, null, null);TreeNode tNode13 = new TreeNode(5, null, null);TreeNode tNode14 = new TreeNode(30, null, null);TreeNode tNode21 = new TreeNode(30, tNode11, tNode12);TreeNode tNode22 = new TreeNode(30, tNode13, tNode14);TreeNode tNodeRoot = new TreeNode(100, tNode21, tNode22); System.out.println(minlength(tNodeRoot));}private static int minlength(TreeNode tNode){if (tNode != null) {return getlength(tNode,0);}return -1;}private static int getlength(TreeNode tNode,int curLength) {int minLeft=-1;int minRight=-1;if (tNode.leftNode!=null){minLeft=getlength(tNode.leftNode, curLength+tNode.value); }if (tNode.rightNode!=null) {minRight=getlength(tNode.rightNode, curLength+tNode.value); }if (tNode.leftNode==null && tNode.rightNode==null) {return curLength+tNode.value;if (tNode.leftNode==null) {return minRight;}if (tNode.rightNode==null) {return minLeft;}return minLeft>minRight? minRight:minLeft;}}class TreeNode {int value;TreeNode leftNode;TreeNode rightNode;TreeNode(int value, TreeNode lefeNode, TreeNode rightNode) { this.value = value;this.leftNode = lefeNode;this.rightNode = rightNode;}}2.lru#include <iostream>using namespace std;int lruCountMiss(int max_cache_size, int *pages, int len){int count = 0;int i,j,k,n;bool flag = false;int *a = new int[max_cache_size];//初始化高速缓存数组for(i = 0; i < max_cache_size; i++){a[i] = -1;}for(j= 0; j < len; j++){for(i = 0; i < max_cache_size; i++){if(pages[j] != a[i]){continue;}else{break;}}if(i != max_cache_size){for(k = i; k < max_cache_size; k++){if(a[k] == -1){flag = true;break;}}if(!flag){for(n = i; n < max_cache_size - 1; n++)a[n] = a[n+1];}a[max_cache_size - 1] = pages[j];}else{flag = false;for(n = i; n < k - 1; n++){a[n] = a[n+1];}a[k - 1] = pages[j];}}else{count ++;for(i = 0; i < max_cache_size; i++){if(a[i] == -1){a[i] = pages[j];flag = true;break;}}if(!flag){for(i = 0; i < max_cache_size-1; i++)a[i] = a[i+ 1];}a[max_cache_size - 1] = pages[j]; }elseflag = false;}}return count;}int main(){int arr[] = {7, 0, 1, 2, 0, 3, 0, 4};cout << lruCountMiss(3, arr, 8) << endl; return 0;}3.反转链表lnode *reverse(lnode *head){if(head){lnode *prev = NULL;lnode *curr = head;lnode *next = curr->next;curr->next = prev;while(next != NULL){prev = curr;curr = next;next = next->next;curr->next = prev;}return curr;}else{return head;}};lnode *reverseLinkedList(lnode *list){if(list){lnode *ori = list;lnode *half = list;lnode *prev = list;while(list && half && half->next){prev = list;list = list->next;half = half->next;if(half){half = half->next;}}if(list){prev->next = reverse(list);}return ori;}return list;}4. SJFfloat waitingTimeSJF(int * requestTimes, int * durations,int n){ int *flags = new int[n];float sums = 0;for(int i = 0 ;i< n; i++){flags[i] = -1;}int nowtime = 0;for( int i = 0; i< n; i++ ){int count = 0;for(int k = 0; k< n;k++){if(count == 0){if(requestTimes[k] <= nowtime && durations[k] >=0 ){ flags[count++] = k;}}else{if(durations[k] >=0 && requestTimes[k] <= nowtime ){ if( durations[k] < durations[flags[0]]){count = 1;flags[0] = k;}else if( durations[k] == durations[flags[0]] ){flags[count++] = k;}}}}if(count == 0){count = 1;for(int j = 0; j< n ;j++){if(durations[j] >=0 ){flags[0] = j;nowtime = requestTimes[j];}}}int idx = flags[0];int minreq = requestTimes[ flags[0] ];int mindrus = durations[idx];if(count > 1){for(int j = 1; j < count ;j++){if(requestTimes[flags[j]] < minreq ){ minreq =requestTimes[flags[j]]; idx = flags[j];}}}sums += nowtime - requestTimes[idx];nowtime += durations[idx];requestTimes[idx] = -1;durations[idx] = -1;}return sums/n;}5 无向连通判断是否为树#include<stdio.h>#include<stdlib.h>#include<string.h>const int N=10000, M=100000;bool edge[N][N]; // 数组记录两点是否存在边bool visit[N]; // 标记该节点是否访问过bool DFS_check(int x, int y=-1) {if (visit[x])return false;visit[x] = true;int i;for (i=0;i<N;i++)if (edge[x][i] && i!=y)if (visit[i])return false;elseif (!DFS_check(i, x))return false;return true;}int main(){int n,m;scanf("%d%d",&n,&m);memset(edge,false,sizeof(edge)); int i,x,y;for (i=0;i<m;i++){scanf("%d%d",&x,&y);edge[x-1][y-1] = true;edge[y-1][x-1] = true;}memset(visit,false,sizeof(visit)); bool result = DFS_check(0);if (result)for (i=0;i<n;i++)if (!visit[i])result = false;if (result)printf("Yes!\n");elseprintf("No!\n");system("pause");return 0;}6. 老鼠奶酪#include <iostream>using namespace std;int isPath(int **grid, int m, int n);struct _TraversedNode{int x;int y;_TraversedNode *next;};struct _Node{int x;int y;};int main(int argc, const char * argv[]){int **grid= new int*[8];for(int i=0;i<8;i++){grid[i]= new int[8];}grid[0][0]=1; grid[0][1]=1; grid[0][2]=0; grid[0][3]=0; grid[0][4]=0; grid[0][5]=0; grid[0][6]=0; grid[0][7]=1;grid[1][0]=1; grid[1][1]=1; grid[1][2]=1; grid[1][3]=1; grid[1][4]=1; grid[1][5]=1; grid[1][6]=1; grid[1][7]=1;grid[2][0]=1; grid[2][1]=0; grid[2][2]=0; grid[2][3]=0; grid[2][4]=1; grid[2][5]=0; grid[2][6]=0; grid[2][7]=1;grid[3][0]=1; grid[3][1]=1; grid[3][2]=1; grid[3][3]=0; grid[3][4]=1; grid[3][5]=0; grid[3][6]=0; grid[3][7]=1;grid[4][0]=0; grid[4][1]=1; grid[4][2]=0; grid[4][3]=0; grid[4][4]=1; grid[4][5]=1; grid[4][6]=1; grid[4][7]=1;grid[5][0]=0; grid[5][1]=1; grid[5][2]=0; grid[5][3]=0; grid[5][4]=0; grid[5][5]=0; grid[5][6]=0; grid[5][7]=1;grid[6][0]=0; grid[6][1]=1; grid[6][2]=0; grid[6][3]=9; grid[6][4]=1; grid[6][5]=1; grid[6][6]=1; grid[6][7]=1;grid[7][0]=0; grid[7][1]=1; grid[7][2]=1; grid[7][3]=1; grid[7][4]=0; grid[7][5]=0; grid[7][6]=1; grid[7][7]=0;for(int i=0;i<8;i++){for(int j=0;j<8;j++)cout<<grid[i][j]<<" ";;cout<<endl;}return isPath(grid,8,8);}int isPath(int **grid, int m, int n){if(grid[0][0]==0) return 0;if(grid[0][0]==9) return 1;int step=0;bool flag_down_success=true;bool flag_up_success=true;bool flag_left_success=true;bool flag_right_success=true;_TraversedNode *p=NULL;_TraversedNode *p_check=NULL;_TraversedNode *head=NULL;_TraversedNode *TraversedNode = new _TraversedNode;TraversedNode->x=0;TraversedNode->y=0;head=TraversedNode;p=TraversedNode;p->next=NULL;int count_node=0;int num_node=1;_Node *node=new _Node[n+m];_Node *node_next=new _Node[n+m];node[0].x=0;node[0].y=0;while(1){for(int i=0;i<num_node;i++){if(node[i].x+1<=m-1){if(grid[node[i].x+1][node[i].y]!=0){if(grid[node[i].x+1][node[i].y]==9){step++;cout<<"可以最短"<<step<<"步到达终点"<<endl;return 1;}p_check=head;while(p_check!=NULL){if((p_check->x==node[i].x+1)&&(p_check->y==node[i].y)) {p_check=NULL;flag_down_success=false;}else{p_check=p_check->next;}}if(flag_down_success){TraversedNode=new _TraversedNode;TraversedNode->x=node[i].x+1;TraversedNode->y=node[i].y;p->next=TraversedNode;p=TraversedNode;p->next=NULL;node_next[count_node].x=node[i].x+1;node_next[count_node].y=node[i].y;count_node++;}flag_down_success=true;}}if(node[i].x-1>=0){if(grid[node[i].x-1][node[i].y]!=0){if(grid[node[i].x-1][node[i].y]==9){step++;cout<<"可以最短"<<step<<"步到达终点"<<endl;return 1;}p_check=head;while(p_check!=NULL){if((p_check->x==node[i].x-1)&&(p_check->y==node[i].y)) {p_check=NULL;flag_up_success=false;}else{p_check=p_check->next;}}if(flag_up_success){TraversedNode=new _TraversedNode; TraversedNode->x=node[i].x-1;TraversedNode->y=node[i].y;p->next=TraversedNode;p=TraversedNode;p->next=NULL;node_next[count_node].x=node[i].x-1; node_next[count_node].y=node[i].y; count_node++;}flag_up_success=true;}}if(node[i].y+1<=n-1){if(grid[node[i].x][node[i].y+1]!=0){if(grid[node[i].x][node[i].y+1]==9){step++;cout<<"可以最短"<<step<<"步到达终点"<<endl;return 1;}p_check=head;while(p_check!=NULL){if((p_check->x==node[i].x)&&(p_check->y==node[i].y+1)) {p_check=NULL;flag_right_success=false;}else{p_check=p_check->next;}}if(flag_right_success){TraversedNode=new _TraversedNode;TraversedNode->x=node[i].x;TraversedNode->y=node[i].y+1;p->next=TraversedNode;p=TraversedNode;p->next=NULL;node_next[count_node].x=node[i].x;node_next[count_node].y=node[i].y+1;count_node++;}flag_right_success=true;}}if(node[i].y-1>=0){if(grid[node[i].x][node[i].y-1]!=0){if(grid[node[i].x][node[i].y-1]==9){step++;cout<<"可以最短"<<step<<"步到达终点"<<endl;return 1;}p_check=head;while(p_check!=NULL){if((p_check->x==node[i].x)&&(p_check->y==node[i].y-1)) {p_check=NULL;flag_left_success=false;}else{p_check=p_check->next;}}if(flag_left_success){TraversedNode=new _TraversedNode;TraversedNode->x=node[i].x;TraversedNode->y=node[i].y-1;p->next=TraversedNode;p=TraversedNode;p->next=NULL;node_next[count_node].x=node[i].x; node_next[count_node].y=node[i].y-1; count_node++;}flag_left_success=true;}}}if(count_node==0){cout<<"不存在到达终点的路径"<<endl;return 0;break;}step++;num_node=count_node;count_node=0;for(int i=0;i<num_node;i++){node[i].x=node_next[i].x;node[i].y=node_next[i].y;cout<<"("<<node[i].x<<","<<node[i].y<<") "; }cout<<endl;}}7.格雷码import java.util.Scanner;public static int gray(byte term1,byte term2){int n=0;for(int i=0;i<8;i++){byte t1,t2,ch;ch = (byte)0x01;t1=term1&ch;t2=term2&ch;if((t1^t2)==ch){n++;}term1=(byte)(term1>>1);term2=(byte)(term>>1);}if(n==1)return 1;elsereturn0;}8.#include <iostream>using namespace std;void myPrint(int n){if(1 == n){cout << "1*2" <<endl;return;}int lastnumber = n*(n+1);//每一行最后一个数int first=1;//每一行第一个数int num=1;int step=n;for(int i=1;i<=n;i++){for(int j=1;j<i;j++)//输出‘-’cout<<'-';num = first;for(int l=0;l<(n-i+1);l++)//每一行的前半部分{cout << num << "*";num++;}num = lastnumber - step+1;cout << num ;num++;for( l=0;l<(n-i);l++)//每一行的后半部分{cout << "*"<<num;num++;}cout << endl;//修改first和lastnumberfirst = first+step;lastnumber = lastnumber - step;step--;}}int main(){int n;while(cin>>n){myPrint(n);}return 0;}9短作业优先调度算法(SJF)public class ShortJobFirst {public static void main(String[] args) {int[] requestTimes = {0, 2, 4, 5};int[] durations = {7, 4, 1, 4};float averageWaitingTime = ShortJobFirst.minWaitingTime(requestTimes, durations);System.out.println(averageWaitingTime);}/**** @param requestTimes 任务提交时间* @param durations 任务服务时间* @return*/public static float minWaitingTime(int[] requestTimes, int[] durations) {if(requestTimes == null || durations == null)return -1;if(requestTimes.length != durations.length)return -1;int n = requestTimes.length;int[] durationTimes = copyArray(durations); // 复制一份服务时间int[] startTimes = new int[n]; // 开始时间int[] endTime = new int[n]; // 结束时间int[] waitingTime = new int[n]; // 等待时间int[] cycleTime = new int[n]; // 周转时间// 第一个执行任务的开始时间、结束时间、等待时间startTimes[0] = requestTimes[0];endTime[0] = startTimes[0] + durations[0];waitingTime[0] = 0;/** 核心代码 **/int lastIndex = 0; // 上一次执行任务的索引int minIndex = 0; // 最短任务的索引for(int i = 1; i < n; i++) {minIndex = getMinIndex(durations); // 作曲最短任务索引为当前任务startTimes[minIndex] = endTime[lastIndex]; // 当前任务的开始时间为上一个任务的结束时间endTime[minIndex] = startTimes[minIndex] + durationTimes[minIndex]; // 结束时间 = 开始时间 + 服务时间waitingTime[minIndex] = startTimes[minIndex] - requestTimes[minIndex]; // 等待时间 = 开始时间 - 提交时间cycleTime[minIndex] = endTime[minIndex] - requestTimes[minIndex]; // 周转时间 = 结束时间 - 提交时间lastIndex = minIndex; // 更新当前任务索引为下一次循环中的“上一次任务索引”}// 计算平均等待时间int s = 0;for(int i : waitingTime)s += i;float averageTime = (float) s / (float) n;return averageTime;}// 获取最短任务索引,获取完成之后,该任务的服务时间置为最大值,从下一次寻找最短任务的过程中排除。
亚信笔试题正常

第一部分JAVA语言基础一、选择题1、若所用变量都以正确定义,一下选项中,非法的表达式是CA a!=4||b==1B ‘a’%3C ‘a’=1/2D ‘A’+322、下列语句序列执行后,j的值是A 5B 6C 7D 83、java语言的类间的继承关系是BA 多重的B 单重的C 线程的D 不能继承4、下列定义中,不正确的是 CA class x{…}B class x extends y {…}C static class x implements y1,y2{…}D public class x extends Applet{…}5、定义java Applet程序时,必须有的import语句是AA import java.applet.Applet;B import java.io.*C import java.awt.event;D import ng.*;6、下列方法定义中,不正确的是DA public int x( ){…}B public static int x(double y){…}C void x (double d){…}D public static x (double a){…}7、下列的哪个选项可以正确表达八进制8 CA 0x8B 0x10C 08D 0108、下列关于继承的哪项叙述是正确的CA 在java中允许多重继承B 在java中一个类只能实现一个接口C 在java中一个类不能同时继承一个类和实现一个接口D java的单一继承使代码更可靠字串19、若已定义byte[]x={11,22,33,-66};其中0<=k<=3,则对x数组元素错误的引用时 cA x[5-3]B x[k]C x[k+5]D x[0]10、给出下列代码,如何是成员变量m被方法fun()直接访问 -----成员变量在类中定义,局部变量在方法中定义 CClass test{Private int m;Public static void fun(){…}}A 将private int m 改为 protected int mB 将private int m 改为 public int mC 将private int m 改为 static int mD 将 private int m 改为 int m11、Given: F1 public class Alphal{2 public static void main(String[] args){3 boolean flag; int i=0;1 do{2 flag = false;3 system.out.println(i++);4 flag = 1 < 105 continue;6 }while((flag)?True;false);7 }8 }What is result?A 0000000000B 0123456789C Compilation failsD The code runs with no output.E The code enters an infinite loopF An exception is thrown at runtime e.12、Given() D1 package foo;23 import java.Util.Vector;45 protected class MyVector Vector{6 int i=1;7 public MyVector()8 i=2 ;9 }10 }1112 public class MyNewVector extends MyVector{13 public MyNewVector(){14 i=4;15 }16 public static void main(String args[]){17 MyVector v=new MyNewVector18 }19 }what is the result?()A. Compilation succeedsB. Compilation falis because of an error at line5C. Compilation falis because of an error at line6D. Compilation falis because of an error at line14E. Compilation falis because of an error at line1713、Given:()1 class Super{2 public integer getlength(){3 return new integer(4);}}45 public class Sub extends Super}6 public Long GetLength(){return new Long(5);}78 public static void main(String[] args){9 Super sooper = new Super();10 Sub sub = new Sub();11 System.out.println(12 sooper.getLength().toString()+","+13 sub.getLength().toString() );14 }15 }What is the output?A.4,4B.4,5C.5,4D.5,5pilation fails.14、Given:1 public class Test{2 public static String output=....;34 public static void foo (int){5 try{6 if(i==1){7 throw new Exception();8 }9 output+="2";10 }11 Catch(Exception e){12 OutPut+="1";13 Return;14 }15 Finally{16 Output+="3";17 }18 Output+="4"19 }2021 Public static void main(string args[]){22 Foo(0);23 Foo(1);2425 }26 }What is the value of the variable output at line 23?15、Given:() D1 class Base{2 Base(){System.out.print("Base");}3 }4 public class Alpha extends Base{5 public static void main(String []args){6 new Alpha();7 new Base();8 }9 }What is the result?A. BaseB. Basebasec. Compilation fails.D. The code runs with no output.E. An exception is thrown at runtime.16、Given:1 int l=1,j=-1;2 switch(i){3 case 0,1:j=1;4 case 2;j=2;5 default;j=0;6 }7 System.out.println("j="+j);What is the result?A.j=-1B.j=0C.j=1D.j=2pilation fails.---------------17、Which two are valid declarations within an interface definition?(Choose two)A. void methoda();B. public double methoda();C. public final double methoda();D. static void methoda(double dl);E. Protected void methoda(double dl);18、Which two allow the class Thing to be instantiated using new Thing()?(Choose two)A. public class thing{}B. public class thing{public thing(){}}C. public class thing{public thing(void){}}D. public class thing{public thing(String s){} }E. public class thing{public thing(){} public thing(String s){} }19、Given:1 public class X{2 public static void main(String[] args){3 try{4 badMethod()5 System.out.print(“A”);6 }7 catch (Exception ex){8 System.out.print(“B”);9 }10 Finally{11 System.out.print(“C”);12 }13 System.out.print(“D”);14 }15 public static void badMethod(){16 throw new RuntimeException();17 }18 }What is the result?A.ABB.BCC.ABCD.BCDpilation fails20、 Given:1 class TestA{2 TestB b;3 TestA() {4 b = new testB(this);5 }6 }7 class TestB {8 TestA a;9 TestB(TestA a){10 this.a = a;11 }12 }13 Class TestA11 {14 public static void main (String args[]){15 new TestA11().makeThings();16 //…code continues on17 }18 void makeThings(){19 TestA test = new TestA();20 }21 }Which two statements are true after line 15 before main completes?(Choose two)A.Line 15 causes a stack overflow.B.An exception is thrown at runtime.C.The object referenced by a is eligible for garbage collection.D.The object referenced by b is eligible for garbage collection.E.The object referenced by a is not eligible for garbage collection.F.The object referenced by b is not eligible for garbage collection.二、简答题(共6题,每题5分,共30分)1、java中作用域public,private,protected以及不写时的区别2、列出java中所有基本数据类型,并说明这些数据类型占用的字节数?同时说明基本数据类型和其他类型在使用上的区别?3、请详细阐述static在java中的应用?4、请阐述抽象类、继承、接口的概念及相互关系?5、Try{ }里有一个return语句,那么紧跟在这个try后的finally{ }里的code会不会被执行,什么时候被执行,在return前还是后?6、GC是什么?为什么要有GC。
亚信安全笔试题

亚信安全笔试题亚信安全技术培训师岗位笔试题一、单项选择题(每题只有一个正确答案,共30题)1、亚信安全作为国内知名的网络安全公司,其主要业务不包括以下哪项?A. 安全产品研发B. 网络安全培训C. 软件开发外包D. 安全咨询服务2、在网络安全领域,以下哪个协议主要用于加密电子邮件?A. SSLB. SSHC. PGPD. FTP3、防火墙的主要作用是什么?A. 阻止内部网络攻击B. 过滤进出网络的数据包C. 加速网络传输速度D. 提供网络存储服务4、SQL注入攻击主要针对的是哪种系统?A. 操作系统B. 数据库系统C. 应用系统D. 网络设备5、以下哪种加密方式属于对称加密?A. RSAB. AESC. DSAD. ECC6、跨站脚本攻击(XSS)通常利用哪种漏洞?A. 输入验证漏洞B. 跨域访问漏洞C. 浏览器安全漏洞D. 操作系统漏洞7、在网络安全领域,什么是“零日漏洞”?A. 已知但未修复的漏洞B. 未知且未公开的漏洞C. 永远不会修复的漏洞D. 专门用于黑客攻击的漏洞8、以下哪个不是网络安全防护的基本原则?A. 最小权限原则B. 深度防御原则C. 数据共享原则D. 安全审计原则9、网络钓鱼攻击通常通过什么方式实施?A. 发送恶意软件B. 伪造电子邮件或网站C. 利用社会工程学D. 破解目标系统密码10、以下哪种技术可以用于检测网络中的异常行为?A. 防火墙B. 入侵检测系统(IDS)C. 虚拟专用网络(VPN)D. 负载均衡器11、在网络安全中,什么是“蜜罐”?A. 用于存储敏感数据的服务器B. 故意暴露漏洞以吸引攻击的系统C. 用于收集网络流量的设备D. 提供虚假服务的服务器12、以下哪个不是常见的网络安全威胁?A. 拒绝服务攻击(DoS)B. 数据泄露C. 电磁辐射干扰D. 恶意软件感染13、什么是“安全套接字层”(SSL)?A. 一种网络协议B. 一种加密技术C. 一种身份验证方法D. 一种病毒防护软件14、在网络安全领域,什么是“沙箱”?A. 用于隔离恶意软件的虚拟环境B. 用于测试网络性能的工具C. 用于存储数据的服务器D. 用于保护硬件安全的设备15、以下哪种方法不属于数据加密技术?A. 散列函数B. 对称加密C. 非对称加密D. 数据压缩16、以下哪个不是网络安全领域常用的术语?A. 防火墙B. 入侵检测系统C. 路由器D. 蜜网17、什么是“网络钓鱼”(Phishing)?A. 通过网络进行非法捕鱼的活动B. 利用虚假电子邮件或网站骗取个人信息C. 黑客入侵并控制目标计算机的行为D. 在网络中传播恶意软件的行为18、在网络安全中,什么是“端口扫描”?A. 检查网络设备的物理端口状态B. 检测目标计算机上开放的网络服务端口C. 扫描网络中的病毒和恶意软件D. 监控网络流量并分析数据19、以下哪种方法不属于网络安全的防御策略?A. 访问控制B. 数据加密C. 漏洞扫描D. 数据共享20、什么是“数字签名”?A. 用于验证数字文档真实性的技术B. 在网络中传输数字文件的方式C. 保护数字文件不被篡改的技术D. 加密存储数字文件的方法21、以下哪个不是网络安全管理的关键过程?A. 安全策略制定B. 安全风险评估C. 安全事件响应D. 网络性能优化22、在网络安全领域,什么是“恶意软件”(Malware)?A. 用于破坏计算机系统的软件B. 未经授权访问网络的软件C. 用于收集用户信息的软件D. 用于优化计算机性能的软件23、以下哪种攻击方式不属于社会工程学范畴?A. 钓鱼攻击B. 尾随攻击C. 密码猜测D. 假冒身份24、以下哪个不是网络安全中的“三A”服务?A. 认证(Authentication)B. 授权(Authorization)C. 访问(Access)D. 记账(Accountability)25、什么是“加密哈希函数”?A. 用于加密数据的函数B. 将任意长度的数据转换为固定长度摘要的函数C. 用于验证数据完整性的函数D. 用于保护数据不被篡改的技术26、以下哪个不是常见的网络安全攻击类型?A. 中间人攻击B. 水坑攻击C. 端口扫描攻击D. 拒绝服务攻击27、在网络安全中,什么是“安全漏洞”(Vulnerability)?A. 网络设备的物理缺陷B. 软件或系统中的安全缺陷C. 网络连接的稳定性问题D. 用户操作不当造成的安全问题28、以下哪个不是网络安全领域的专业术语?A. IPSecB. DMZC. SNMPD. USB29、什么是“入侵检测系统”(IDS)?A. 用于检测网络中的异常流量和行为的系统B. 用于阻止外部攻击的系统C. 用于收集网络数据的系统D. 用于提供网络服务的系统30、以下哪个不是网络安全防护中需要遵循的原则?A. 保密性B. 完整性C. 可用性D. 开放性________________________________________。
2021年亚信科技校园招聘笔试真题

2021 年亚信科技校园招聘笔试真题考试时间 120_分钟 _ 考试方式〔闭〕卷第一局部——JAVA语言根底一、单项选择题〔每题2分,总分16分〕1.以下java标识符,错误的选项是( )。
A _$userNameB $userNameC USER_NAMED 1userName2.三元条件运算符ex1?ex2:ex3,相当于下面( )语句。
A if〔ex1〕 ex3;else ex2;B if〔ex2〕 ex1;else ex3;C if〔ex1〕 ex2;else ex3;D if〔ex3〕 ex2;else ex1;3.以下不属于面向对象编程的三个特征的是( )。
A. 封装B. 指针操作C. 多态性D. 继承4.关于构造方法,以下说法错误的选项是( )。
A. 构造方法不可以进展方法重写B. 构造方法用来初始化该类的一个新的对象C. 构造方法具有和类名一样的名称D. 构造方法不返回任何数据类型5.关于java线程,下面说法错误的选项是( )。
A 线程是以CPU为主体的行为B 新线程一旦被创立,它将自动开场运行C 创立线程的方法有两种:实现Runnable接口和继承Thread类D java利用线程使整个系统成为异步6.在Java中,一个类可同时定义许多同名方法,这些方法的形式参数个数、类型或顺序各不一样,传回的值也可以不同。
这种面向对象程序的特征称为( )。
A 重载B 隐藏C 覆盖D Java不支持该特性7.有以下方法的定义,该方法的返回类型是( )。
ReturnType method(byte x, double y) {return (short)x/y*2;}A、doubleB、intC、shortD、byteE、float8.以下声明中,错误的选项是( )。
A、float f = 1.2;B、float f = 1.2f;C、float f = (float)1.2;D、float f =1;二、填空题〔每题2分,总分14分〕1.我们在java程序中,把关键字____ ____加到方法名称的前面,来实现子类调用父类的方法。
亚信笔试题(翻译后的)

一、选择题1、Given the following class,which statements can be inserted at position 1 without causing the code to fail compilation? 答案是//给出如下类,选项中那句话插入位置1不会造成编译错误的是哪一项?Public class Q6db8{int a ;int b=0;static int c;public void m(){int d;int e=0;//Position 1}}A、a++;B、b++;C、c++;D、d++;E、e++;2、Consider the following line of code:int x[]=new int[25];After execution,which statement or statemensts are true? 答案是//思考下面一行代码,执行过后,选项中哪一项或哪些说法是正确的?A、x[24] is 0.B、x[24] is undefinedC、x[25] is 0.D、x[0] is null.E、x.length is 25.3、Consider the following application:1. class Q6{2. public static void main(String args[]){3 Holder h=new Holder();4 h.held=100;5 h.bump(h);6 System.out.println(h.held);7. }8. }9.10. class Hoder{11. public int held;12 public void bump(Holder theHolder){theHolder.held++;}13. }What value is printed out at line 6? 答案是//思考如下应用,第六行的输出结果是什么?A、0B、1C、100D、1014、The demonstrate(s) belongs to “has a” relationship? 答案是//选项中哪一项或哪些项是has-a关系?A、public interface Person{} public class Employee extends Person{}B、p ublic interface Shape{} public inter face Recrandle extends Shape{}C、p ublic interface Colorable{} public calss Shape implements Colorable{}D、public class Species{} public class Animal{private Species species}E、interface Componet{} class Container implements Component{private Component[]children;}5、Consider the following code://思考如下代码1.for(int i=0;i<2;i++){2. for(int j=0;j<3;j++){3. if(i==j){4. continue;5. }6 System.out.println(“i= ”+i+”j= ”+j);.7. }8.}Which lines would be part of the output? 答案是://那一行是输出的一部分a.i=0 j=0b.i=0 j=1c.i=0 j=2d.i=1 j=oe.i=1 j=1f.i=1 j=26、Consider the following class hierarchy and code fragments://看下面的类的结构和代码块ng.Exception\Java.io.IOException/\Java.io.StreamCorruptedException .MalformedURLException1.try{2.URL u=new URL(s);//assume s is previously defined3.Object o=in.readObject();//in is an ObjectInputStream4.System.out.println(“Success”);5.}6.catch(MalformedURLException e){7.System.out.println(“Bad URL”);8.}9.catch(StreamCorruptedException e){10.System.out.println(“Bad file contents”);11.}12.catch(Exception e){13.System.out.println(“General exception”);14.}15.finally{16.System.out.println(“doing finally part”);17.}18.System.out.println(“Carrying on”);What lines are output if the method at line 2 throws a Malformed URL Exception? 答案是//如果在第2行抛出一个Malformed URL Exception 将输出什么?A、SuccessB、Bad URLC、Bad file contentsD、General exceptionE、Doing finally partF、Carrying on7、1. public class Text extends Base2. public Test(int j){3. }4. public Test(int j,int k){5. super(j,k);6. }7.}Which of the following are legitimate calls to construct instance of Test class? 答案是//下列哪些项是对test类的构造器实例的合法调用?A、Test t=new Test();B、Test t=new Test(1);C、Test t=new Test(1,2);D、Test t=new Test(1,2,3);E、Test t=(new Base()).new Test(1);8、Which one statement is true about the code fragment below? 答案是//在下面的代码片段中,那一种陈述是正确的1. String s=”abcde”;2. StringBuffer s1=new StringBuffer(“abcde”);3.if(s.equals(s1))4. s1=null;5. if(s1.equals(s))6.s=null;A、Compilation fails at line 1,because the String constructor must be called explicitly.//在第一行编译失败,因为字符串构造器必须有明确的命名B、Compilation fails at line 3,because s and s1 have different types.//在第3行编译失败,因为s和s1 是不同的类型C、Compilation succeeds.During execution,an exception is thrown at line 3.//编译成功,在执行期间,在第三行抛出一个异常D、Compilation succeeds.During execution,an exception is thrown at line 5.//编译成功,在执行期间,在第五行抛出一个异常E、Compilation succeeds.No exception is thrown during execution.//编译成功,在执行期间没有异常抛出9、Which would be most suitable for storing data elements that must not appear in the store more than once, if searching is not a priority? 答案是//下列哪些对象最适合用于存放在结构中最多只出现一次的数据,如果查找是没有先后顺序的?A、CollectionB、ListC、SetD、MapE、Vector10、Given that Thing is a class,how many objects and reference variables are created by the following code? 答案是//假如Thing是一个类,在接下来的代码中友多少对象和引用变量将被创建Thing item,stuff;Item=new Object();Thing entity=new Object();A、One object is created;B、Two objects are created.C、Three objects are created.D、One reference variable is created.E、Two reference variables are createdF、Three reference variables are created11.Examine the structure of the EMPLOYESS table:查看雇员表的架构:EMPLOYEE_ID NUMBER Primary KeyFIRST_NAME V ARCHAR2(25)LAST_NAME V ARCHAR2(25)//小写employee_id number primary key,first_name varchar2(25),last_name varchar2(25)Which three statements insert a row into the table ?(choose three)下面那三个语句能向雇员表中插入一行?(请选择三个正确答案)( )A.insert into employees values(null,'john','smith');B.insert into emoloyees (first_name,last_name) values('john''smith')C.insert into employees values('1000','jhon',null);D.insert into emoloyees(first_name,last_name,employee_id)values(1000,'john','smith');E.insert into employees(employee_id)values(1000);F.insert into Employees(employee_id,first_name,last_name)values(1000,'jhon','');12. Evaluate the SQL statement:评定下面的SQL语句:select round(45.953,-1),trunc(45.936,2)from dual;Which values are displayed?语句执行后显示的值是什么?A.46 and 45B.46 and 45.93C.50 and 45.93D.50 and 45.9E.45 and 45.93F.45.95 and 45.9313.Click the Exhibit button to examine the data of the EMPLOYEES tableWhich statement lists the ID,name,and salary of the employee,and the ID and name of the employee’s manager,for all the employees who have a manager and earn more than 4000?答案是点击显示按钮查看雇员表的数据,在所有员工中,列举出上有部门经理且薪资大于4000职员的编号,姓名,薪金,部门经理的编号和姓名的SQL语句是:( )(提示:在雇员表中,employee_id是主键,MGR_ID 是经理的编号参照于employee_id)A.select emploee_id "Emp_id",emp_name"Employee",salary,employee_id"Mgr_id",emp_name"Manager"from employees where salary > 4000;B.select e.emploee_id "Emp_id",e.emp_name"Employee",e.salary,m.employee_id"Mgr_id",m.emp_name"Manager" from employees e join employees m where e.mgr_id=m.mgr_id and e.salary>4000;C. select e.emploee_id "Emp_id",e.emp_name"Employee",e.salary,m.employee_id"Mgr_id",m.emp_name"Manager" from employees e join employees m on(e.mgr_id=m.employee_id) and e.salary>4000;D.select e.emploee_id "Emp_id",e.emp_name"Employee",e.salary,m.employee_id"Mgr_id",m.emp_name"Manager" from employees e self join employese m wheree.mgr_id=m.employee_id and e.salary>4000;E.select e.emploee_id "Emp_id",e.emp_name"Employee",e.salary,m.employee_id"Mgr_id",m.emp_name"Manager" from employees e join employese m USING(e.mgr_id=m.employee_id) and e.salary>4000;14. Which two statements about sequences are true ?(choose two)答案是对于序列(sequence)的叙述中,哪两个语句是正确的.(请选择两个正确选项)A.You use a NEXTV AL pseudo column to look at the next possible value that would begenerated from a sequence,without actually retrieving the value用NEXTV AL作为虚拟列, 查看序列生成的下一个的值,而不用检索整个序列B. You use a CURRV AL pseudo column to look at the current value just generated from asequence,without affecting the further values to be generated from the sequence用CURRV AL作为虚拟列, 查看序列当前生成的值,而不会影响序列产生下一个值C. You use a NEXTV AL pseudo column to obtain the next possible value that would begenerated from a sequence,by actually retrieving the value from the sequence用NEXTV AL作为虚拟列,通过检索序列去获得序列将产生的下一个值D. You use a CURRV AL pseudo column to generate a value from a sequence that would beused for a specified database coumn用currval作为虚拟列,从一个将被一个指定的数据库列使用的序列来产生一个值E、if a sequence starting from a value 100and incremented by 1 is used by more than oneapplication,then all of these applications could have a value of 105 assigned to their column whose value is being generated by the sequence如果一个序列从100开始,并且步进为1,并被不同的应用使用,然后序列产生的105会被赋给这些应用的列F、You use a REUSE clause when creating a sequence to restart the sequence once itgenerates the maximum value defined for the sequence使用reuse语句的时候,序列会从上一次产生的最大值(结果)开始产生新的序列15. In which teo cases would you use an outer join?下面哪两种情况你使用外连接?(请选择两个正确答案)( )A.The tables being joined have NOT NULL columns连接的表间都没有空的列B.The tables being joined have only matched data连接的表间只有相匹配的数据C.The columns being joined have NULL values连接的列有空值D. The tables being joined have only unmatched data连接的表间只有不匹配的数据E. The tables being joined have both matched and unmatched data连接的表有相匹配的数据和不相匹配的数据F. Only when the tables have a primary Key-foreign key relationship只能在表间存在有主外键的联系16.which two statements complete a transaction?(choose two)下面哪两个句子完成了事物处理?A. DELETE employees;B. DESCRIBE employees;c. ROLLBACK TO SA V APOINT C;D. GRANT SELECT ON employees TO SCOTT;E. ALTER TABLE employees SET UNUSED COLUMN sal;F. SELECT MAX(sal)FROM employeesWHERE department_id = 20;17.Click the Exhibit button and exam the data in the EMPLOYEES table.which three subqueries work?(choose three )点击展示按钮并且检验EMPLOYEES表里的数据,下面哪三个子查询正确(有效)?A. SELECT *FROM employeeswhere salary > (SELECT MIN(salary)FROM employeesGROUP BY department_id);B SELECT *FROM employeesWHERE salary = (SELECT A VG(salary)FROM employeesGROUP BY department_id);C SELECT distinct department_id FROM employees WHERE salary > ANY(SELECTAVG(salary) FROM employees GROUP BY department_id);D SELECT department_id FROM employees WHERE salary > ALL(SELECT A VG(salary)FROM employees GROUP BY department_id);E SELECT last_name FROM employees WHERE salary > ANY(SELECT MAX(salary)FROM employees GROUP BY department_id);F SELECT department_idFROM employeesWHERE salary > ALL(SELECT A VG(salary)FROM employeesGROUP BY A VG(salary));18. your production database is running in the ARCHIVELOG mode and the ARCn process isfunctional.you have two online redo log groups.Which three background progrecess would be involved when a log switch happen?你的成品数据库以ARCHIVELOG(归档)方式运行并且ARCHIVELOG正常运行.你有两个在线日志文件组.当发生日志切换时,哪三个后台将被牵连A.archivalB.log writerC.database writerD.system monitorE.process monitorF.change tracking writer19.you have many users complaining about slow inserts into a large table.while investigating thereason,you find that the number of indexes on the table is high.you want to find out which indexes are not being used;which method would you follow to achieve this?有很多用户向你抱怨,向一个数据量大的表里插入数据慢.当你查找原因的时候,你发现表里的索引/指数的数量太多了.你想找出哪些索引没有被使用,你将用下面的哪个方法来完成这个功能?A.enable index monitoring and query the DBA_OBJECTS VIEWB.enable index monitoring and query the DBA_INDEXES VIEWC.enable index monitoring and query the V$OBJECT_USAGE VIEWD.enable index monitoring and query the DBA_INDEXTYPE_COMMENTS VIEW20.you execute the STARTUP MOUNT command to start your database.For which databaseoperation do you need to start the database in the MOUNT state?你执行STARTUP MOUNT命令来启动的数据库.你需要实现哪些操作来以MOUNT状态启动数据库.A.renaming the control filesB.dropping a user in your databaseC.enabing or disabling redo log archivingD.re_creating the control files,after you lost all the control files in your database二、问答题1、写出至少5个jsp的隐含对象Out session request response page pageContext application exception config2、以文字形式描述servlet的生命周期Servlet的生命周期是指servlet容器如何创建servelt对象、并对servlet对象进行初始化操作、调用其方法完成客户端请求及销毁servlet对象的整个过程。
亚信测试岗位笔试题

亚信测试岗位笔试题
1.请说一下为什么想测试。
2.列举出你知道的国内或国外与测试相关的网站
3.做测试工作,你的优势有哪些,并说明为什么
4.做测试工作,请列举出你害怕遇到的情况有哪些?或者举例在过去测试工作中遇到的困难有哪些
5.在制定项目的测试计划中,你觉得或你认为,好的测试计划都要包括哪些内容,请列举并对这些内容的重要优先级按照从高到低进行排列
6.你认为好的测试用例是什么样的,请给予描述
7.编写测试用例时,你觉得都需要什么内容信息
8.你认为好的bug描述是什么样的,请给与描述
9.你认为好的测试报告应包含哪些内容,请给与描述和说明
10.假如你是公司的行政人员,现在老板给你一个任务,给办公室购买绿色植物,你接下来会怎样来完成这个工作任务,请给予描述。
11.请描述你认为比较好的测试工作流程或者你所做项目的测试工作流程。
亚信笔试题

参考答案修饰函数的返回值,使返回值不能被修改
定义常量
修饰类的成员函数使函数在执行过程中参数不会被修改
修饰函数的形参可以提高程序效率
4.在C++程序中调用被C编译器编译后的函数为什么要加extern”C”声明?
参考答案告诉编译器,这段代码使用C语言的语法来编译
5.请简述以下两个for循环的优缺点
~CC(){cout<<”cc”<<endl;}
};
Intmain()
{ห้องสมุดไป่ตู้
CB b;
CA& a = b;
a.f();
b.f();
CA*p1 = new CA;
CB*p2 = new CB;
CC*p3 = new CC;
Delete p1;
Delete p2;
Delete p3;
Return 0
}
faFncacbcacccacbca
printf(str);
}
请回答运行Test函数会有什么样的结果?
答:函数GetMemory不能传递动态内存,所以str还是等于NULL
另外,strcpy的时候会发生程序崩溃
2)
char *GetMemory( void )
{
char p[] = "hello world";
return p;
}
void Test(void)
{
char *str= NULL;
str=GetMemory();
printf(str);
}
请问运行Test函数会有什么样的结果?
答:GetMemory返回后,函数的内存资源会被释放,
亚信笔试题卷以及答案

亚信联创科技校园招聘B卷考试时间60_分钟_ 考试方式(闭)卷第一部分——计算机基础一、选择题(每题2分,总分40分)1.CPU状态分为目态和管态两种,什么是从目态转换到管态的唯一途径( D )A.运行进程修改程序状态字B.进程调度程序C.中断屏蔽D.中断2.引入多道程序设计的目的是( C )A.增强系统的用户友好性B.提高系统实用性C.充分利用CPUD. 扩充内存容量3.Windows系统是一个(B )操作系统。
A、单用户单系统B、单用户多任务C、多用户单任务D、多用户多任务4.在半导体存储器中,动态随机存储器DRAM的特点是(D )。
A、按位结构方式存储B、按字结构方式储存C、信息在储存介质中移动D、每隔一定时间进行一次刷新5.单地址指令的格式是由(B)构成。
A、操作码和操作数地址B、操作码和原操作数地址C、操作码和目的操作数地址D、操作码和下一条指令地址6.八进制数76转换为二进制数为(C )A、110111B、111101C、111110D、1111117.80486型号的微处理器能同时处理的二进制位数是(C )位。
A、8B、16C、32D、648.下面关于串的的叙述中,哪一个是不正确的(B )A.串是字符的有限序列B.空串是由空格构成的串C.模式匹配是串的一种重要运算D.串既可以采用顺序存储,也可以采用链式存储9.若串S1=‘ABCDEFG’, S2=‘9898’ ,S3=‘###’,S4=‘012345’,执行concat(replace(S1,substr(S1,length(S2),length(S3)),S3),substr(S4,index(S2,‘8’),length(S2)))其结果为()A.ABC###G0123B.ABCD###2345C.ABC###G1234D.ABCD###123410.设有两个串p 和q,其中q 是p 的子串,求q 在p 中首次出现的位置的算法称为(C )A.求子串B.联接C.匹配D.求串长11. 下列字符中,ASCII码值最大的是( D )。
亚信科技技术类笔试题

亚信科技技术类笔试题
以下是为大家提供的亚信科技技术类笔试题
1.interface和abstract的区别?
7.ejb和javabean都是什末?
8.ejb都有哪些构成?
9.servlet的生命周期,比cgi有什末优点?
10.override和overload的区别?
11.jsp的组成部分?
12.写一个jdbc的程序
13.mvc架构的构成和各部分的作用?
14.存储过程和函数的区别?
abstract可不可以继承interface,interface可不可以继承interface?
2.hashmap和hashtable的区别?
3.线程常用的方法是什末?
4.gc是什末?常用的两种方法是什末?
中forward()和redirct()的区别?
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
亚信科技2008年度校园招聘笔试院校名:系别:专业:姓名:性别:应聘地点:□长春□呼和浩特(请选择)手机:Part 1: 个性调查1.T 业分很多门类,按行业分比如软件、电子通信、系统集成等,以软件为例,具体又可以细分为开发、测试、售前方案、咨询等多种。
请描述本人的个性和技术方面的兴趣特长,并结合自己的兴趣为自己设定一个发展目标(简而言之,就是自我感觉在IT业更适合从事什么方面的工作)。
2.请如实回答下面问题。
以下测试仅为表现一个人的个性,无标准答案,仅供参考1) 要是你与同事由于一些问题产生了矛盾,关系紧张起来,这时你将怎么办?A.他若不理我,我也不理他;他若主动前来招呼我,那么我也招呼他。
B.请别人帮助,调解我们之间的紧张关系。
C.从此不再搭理他,并设法报复他。
D.我将主动去接近对方,争取消除矛盾。
2) 如果你被别人错误地认定为干过某一件不好的事情,你将怎么办?A.找这些乱说的人对质,指责他们。
B.同样捏造一些莫须有的事加在对方身上,进行报复。
C.置之一笑,不去理睬,让时间来证明自己的清白。
D.要求组织上调查,以弄清事实真相。
3) 如果你的两个领导人之间关系紧张,你将怎么办?A.哪一边得势就倒向哪一边。
B.采取不介入态度,明哲保身,不得罪任何人。
C.哪一个领导人正确就站在哪一边,态度明确。
D.努力调解两位领导人之间的矛盾。
4) 如果你的好朋友和你发生了严重的意见分歧,你将怎么办?A.暂时避开这个问题,以后再说,以求同存异。
B.请与我和他都亲近的第三者来裁决谁是谁非。
C.为了友谊,迁就对方,放弃自己的观点。
D.下决心中断我们之间的朋友关系。
5) 当别人妒嫉你所取得的成绩时,你将怎么办?A.以后再也不冒尖了,免得被人妒嫉。
B.走自己的路,不管别人持什么态度看待我。
C.同这些妒嫉者争吵,保护自己的名誉。
D.一如即往地工作,但同时注意反省自己的行为。
6) 如果工作需要你去处理某一件事,而处理这件事的结果不是得罪甲,就是得罪乙,而甲和乙恰恰又都是你的好朋友,你将怎么办?A.向甲和乙讲明这件事的性质,想办法取得他们的谅解,再处理这件事情。
B.瞒住甲和乙,悄悄把这件事做完。
C.事先不告诉甲和乙,事后再告诉得罪的一方。
D.为了不得罪甲和乙,宁可不考虑工作上的需要,不去做这件事。
7) 如果你对某一问题的正确看法被领导否定了,你准备怎么办?A.向上级反映,争取上级支持自己。
B.消极怠工,以发泄自己的不满。
C.一如既往地认真工作,在适当时候再向领导人陈述自己的看法。
D.同领导争吵,准备调到其他地方去。
8) 如果你同爱人在假日活动的安排上意见很不一致,你准备怎么办?A. 双方意见都不采纳,另外商量双方都不反对的安排。
B. 放弃自己的意见,接受爱人的主张。
C.与爱人争论,迫使爱人同意自己的安排。
D.到时独自活动,不和爱人在一起度假了。
Part 2: 智力题1、某个名人家里的门铃声整天不断,令其苦不堪言。
于是,他请一位朋友想办法解围。
朋友帮名人在大门前设计了一排6个按钮,其中只有一个是通门铃的。
来访者只要摁错了一个按钮,哪怕是和正确的同时摁,整个电铃系统也将立即停止工作。
在大门的按钮旁边,贴有一张告示,上面写着:“A在B的左边,B是C右边的第三个,C在D的右边,D紧靠着E,E和A中间隔一个按钮。
请摁上面没有提到的那个按钮。
”这6个按钮中,通门铃的按钮处于什么位置?decafb2. 九根等长火柴,怎么在不改变火柴形状或破坏它们的情况下组成七个全等正三角形。
Part 3: 基础知识问答1. 请解释“Software Life Cycle”指什么?具体分为哪几个阶段?答:“Software Life Cycle”指的是软件生命周期,主要分为以下几个阶段:(1)、需求分析在确定软件开发可行的情况下,对软件需要实现的各个功能进行详细分析。
需求分析阶段是一个很重要的阶段,这一阶段做得好,将为整个软件开发项目的成功打下良好的基础。
"唯一不变的是变化本身。
",同样需求也是在整个软件开发过程中不断变化和深入的,因此我们必须制定需求变更计划来应付这种变化,以保护整个项目的顺利进行。
(2)、软件设计此阶段主要根据需求分析的结果,对整个软件系统进行设计,如系统框架设计,数据库设计等等。
软件设计一般分为总体设计和详细设计。
好的软件设计将为软件程序编写打下良好的基础。
(3)、程序编码此阶段是将软件设计的结果转换成计算机可运行的程序代码。
在程序编码中必须要制定统一,符合标准的编写规范。
以保证程序的可读性,易维护性,提高程序的运行效率。
(4)、软件测试在软件设计完成后要经过严密的测试,以发现软件在整个设计过程中存在的问题并加以纠正。
整个测试过程分单元测试、组装测试以及系统测试三个阶段进行。
测试的方法主要有白盒测试和黑盒测试两种。
在测试过程中需要建立详细的测试计划并严格按照测试计划进行测试,以减少测试的随意性。
(5)、运行维护软件维护是软件生命周期中持续时间最长的阶段。
在软件开发完成并投入使用后,由于多方面的原因,软件不能继续适应用户的要求。
要延续软件的使用寿命,就必须对软件进行维护。
软件的维护包括纠错性维护和改进性维护两个方面。
2. 在一个平面上画999条直线最多能将这一平面划分成多少个部分?请写出推导公式。
3. 十进制数1351的十六进制表示是什么?答:0x5474、以下叙述中,正确的有:A:队列是这样一种线性表,对于它,所有的插入、删除以及存取都是在该表的一端进行的。
B:堆栈是这样一种线性表,对于它,所有的插入都在表的一端进行,而所有的删除以及存取都在另一端进行。
C:双队列("双端点"的队列)是这样一种线件表,对于它,所有的插入、删除以及存取都在表的两端进行。
D:树是一种非线性结构。
E:一个二叉树的叶节点,在先根次序、中根次序、后根次序三种遍历算法中,会以不同的先后次序出现。
F:快速排序在最坏情况下的时间复杂度为O(NLog2N)。
G:事务处理(TRANSACTION)是数据库运行的基本单位。
如果一个事务处理成功,则全部数据行到更新和提交;如果失败,则已做的全部更新被恢复成原状,好象整个事务处理未进行过一样。
这样使数据库保持了一致性。
H:数据库用户对"脏数据"的读出是由于数据库完整性规则受到了破坏。
Part 4:数据库基础1.请问下面这条SQL执行后,哪些EmpID将作为结果中的一部分返回?a.SELECT empID, dept, salary FROM employee outerb.WHERE salary > (SELECT min(salary)c.FROM employee innerd.WHERE inner.dept = outer.dept);1000 Executive 60000 25-Nov-931016 HumanResources 11000 13-Oct-01 1045答:此查询是属于相关子查询,查询薪水高于本部门最低薪水的那些雇员的信息2.下表内,age和Sa字段的值有很多重复的:Table Ex{Id int pK,Age int,Sa number(8,2)};1、写个SQL语句,把所有重复的Sa找出来;select sa, count(sa) from ex group by sa having count(sa) > 12、写个SQL语句,把所有重复的Sa中年龄不是最小的记录删除,比如有多个Sa是2000的,最小的一个age是25,则仅要保留一个age为25的记录,其它的都要删除。
此处使用了相关子查询delete from ex o where age > (select min(age) from ex i where i.sa=o.sa group by sa having count(sa) > 1) order by saPart 5:C语言编程基础1、以下为Windows NT下的32位C++程序,请计算sizeof的值(5分)char str[] = “Hello” ;char *p = str ;int n = 10;请计算sizeof (str ) =sizeof ( p ) =sizeof ( n ) =2、选择题1).设int a,b,c;执行表达式a=b=1,a++,b+1,c=a+b--后,a,b和c的值分别是A.2,1,2B.2,0,3C.2,2,3D.2,1,32) 若数组名作实参而指针变量作形参,函数调用实参传给形参的是A.数组的长度B.数组第一个元素的值C.数组所有元素的值D.数组第一个元素的地址3) 设int k;则语句for(k=0;k=1;k++);和语句for(k=0;k==1;k++);执行的次数分别是A.无限和0B.0和无限C.都是无限D.都是03、请写出输出结果1) main( ){int j;for(j=4;j>=2;j--)switch(j){case 0: printf("%4s","ABC");case 1: printf("%4s","DEF");case 2: printf("%4s","GHI");breakcase 3: printf("%4s","JKL");default: printf("%4s","MNO");}printf("\n");}2) #define N 2#define M N+1#define NUM 2*M+1int fib(int n){return n<3?2:fib(n-1)+fib(n-2);}main( ){printf("%5d%05d\n",NUM,fib(5));}3)main(){ int y=10;do{y--;}while(--y);printf("%d\n", y--);}3. 有关内存的思考题(8分)Part 6:JAVA语言编程基础1、Java内存分配有几种类型,描述一下String str =new String(“abc”); 在内存中是如何分配。
答:2、String s1 =”abc”与String s2 =new String(“abc”) 有和区别,简单说明一下理由。
答:3、Java的线程实现有几种方式,简述一下为什么存在上述方式。
在Java线程同步如何实现。
答:4、GC是什么?描述下有几种算法实现方式。