诺西笔试3

软件研发类: 1. Give the results to the following operations(10 points) 0xABCD ^ 0x0F0F =__0xa4c3____; 0xA15C | 0x9753 =_0xb75f____; 0xB5 & 0x13 =__0x11___; 2. Assume sizeof(int)=4,give the results to the following calculations(10 points) Int uwData[50]; Sizeof(uwData)=_200__; Typedef struct { Char *pData[50]; } MemStru; Sizeof(MemStru)= 4*50___; 3. Assume the CPU is little endian, what’s the result of cOut?(10 points) int i ; char unData[100]; short cOut; //注意short是16位 for(i=0;i<100;i++) { ucData[i]=i; } cOut =*(short *)((int *)unData +1); then ,cOut =_0x0504__; 4.判断下列条件下的samples++_____,*samples++____操作可行与否 1) int * samples 可以 2) const int *samples samples 第二个可以 3) int * const samples 第一个可以 4) const int *const samples均不可以 5)volatile const int *const samples 均不可以 5. count the number of “1” in a word(32 bits)(10 points) //时间换空间 空间换时间 Unsigned char countones(unsigned int data) { } 6. The following codes calculate the dot product of A and B and save the result to Res. Please point out the possible problems of the codes(10 points) int DotProduct(const short *A,int sizeA,const short *B int sizeB, const short *Res) { int I;/* loop counters*/ for(i=0;i #include int main(void) { char food[] =”Yummy”; char *ptr; ptr = food +strlen(food); while(--ptr>=food) { puts(ptr); } return 0; } 3. What is IP over ATM? In which situation it can be used? 4. What kind of test case should be test automated?Please list at least 3 and give some reason. 5. Please design test cases for online meeting room booking system. Please write down the case title and simplely decription. 6. Digital Library. We hire you as a consultant to help us design a digital library in which books are scanned, stored digitally and made available to users of the World Wide Web.The library will contain ten million books; we will assume that each book contains 400 white pages containing black text.The text on each page covers 6 “x6” (36square inches) and we will represent the text area using 300 dots per inch(dpi) vertically and horizontally.We will represent 1 “dot” with 1 bit and will not use any data compression techniques. We assume that 1000 users access the library simultaneously and that they request a new page once per minute.The bandwidth of the channel connecting the library to the outside world is 100Mhz, and has a capacity that is limited by Gaussian noize. 6.1 How many bytes of data storage are required on the disk? 6.2 What data rate is required to connect the library to the Internet? 6.3 We analyze the link ,and find that it has a bit error rate(BER) of .What packet size is required to ensure that the packet error rate (PER) is less than ? State any assumptions you make. 6.4 Please design test case for robust of the digital library before system online. 7. 有一个农场,利用水渠把池塘里的水泵上来通过水管连到各个菜地的水龙头进行灌溉。有一天当准备对西红柿地进行灌溉的时候,发现水龙头里没有水出来,1)请说明如何检查是哪里的问题。另外一天准备给土豆地进行灌溉的时候,发现水龙头出来的水量比昨天出来的水量少,2)请说明如何检查是哪里的问题。3)如何检测可尽量提高检测效率? 8. One interface card of RNC use WRR(Weighted Round Robin) to do schedule ,please design cases to verify such scheduling. 1. 媒体网关到MSS协议是什么?BICC,BssAp,H.248,ALCAP四选一(H.248) 2. MSS到另一个MSS是什么协议?BICC,BssAp,H.248,ALCAP四选一(BICC) 3. WCDMA切换模式?SOFT,SOFTER,Hard,baton四选一(这一题我选错了,WCDMA常态切换是SOFT,前三种切换都可能存在,BATON是TD-SCDMA的切换模式。) 4. 一共几种WCDMA AMR 语音Code模式,8,7,6,5(8) 5. UE有几种状态,多选CELL_PCH,CELL_FACH,CELL_DCH,URA_PCH多选,(全选) 6. C语言指针题, int a[10]=[1,2,3,4,5,6,7,8,9,10],*p=a, 请问取出9的表达式是什么?选择题,选项不记得了.(*(p+8)) 7. C语言循环题,题目不记得了,差不多是下面这样. i=0, s=0, j=10, k=2 for(;;) { i+=k; if (i>j) {print(s);break; } } s+=i } 最后要求写出输出,选项有20,30,42等.(这题我做错了,s最后一轮没有加就输出了,并且break了,这点应该注意.) 8.关于测试的几个问题 a.测试的流程描述(无非就是设计的测试,编程的测试,单元测试,集成测试,系统测试,验收测试等) b.自动化测试应用的area(功能测试中主要是回归测试,输入输出复杂的测试,重复性高的测试;性能测试中模拟用户的压力,常模拟出人工无法达到的压力,同时操作的压力等) c. 功能测试与系统测试的关系(功能测试是按照产品设计的要求,测试产品是否达到设计时需要的功能,主要应用黑盒测试的方法. 系统测试是按现场要求,模拟真实环境, 验证产品整体是否满足设计要求.) d. Stability测试的几种方法(压力测试,RAMP UP增量测试,极限测试,稳定性测试,容错性测试,问题排查) 9.画出WCDMA结构图,并描述各部分功能. 这个不知道怎么在这里画.下面都是我自己写的,不一定对,网上这种图和解释多了. 各名词解释如下: SGSN:服务GPRS支撑节点,仅用于分组交换, PS业务 MSC:移动交换中心,为UE提供电路交换服务,MSC用于电路交换业务,VLR保存漫游用户服务特征副本,以及UE精确位置信息. RNS:RAN的内部子网,包含一个RAN与NODEB集合. UTRAN: UMTS陆地无线接入网 UE:用户装置 MGW:媒体网关 lub接口:NODEB与RNC的接口 lur接口:RNC之间的接口 RNC:NODEB控制器 10.简述ATM,并讲一下ATM的优缺点. ATM即异步传输模式,在电话交换和分组交换都不能适应未来高带宽,多速率,不同QOS业务的发展需求情况下,逐渐推出了各种传输模式,其中最有名的就是ATM,它是面向连接的分组交换技术,基于固定长度信元的异步传输技术ATM时延小接入速率高,适合突发业务,用于语言图象数据综合传输,缺点是吞吐量略低于其它模式.11.路由题PC1/ROUTER1/ROUTE2/PC2处于不同的子网,如何从PC1到达PC2,通过PING的方式.还有个图,我不知道怎么在这里画出来.总之PC1-ROUTE1-ROUTE2-PC2,这四个都处于不同的网段中.这题不难,懂一点网络的人都会答,但本人就属于完全不懂的那种,所以乱写的,不好意思,就不现了.要求是写出每个网元的路由和网关即可.12.写测试用例 这是一个主备板切换的例子,MGW中有两块SIG板,分别是SIG0和SIG1,现在分别是主板和备板.两种切换方法,一种是出现问题以后,自动由主板切到备板;另一种是手动发送一个SWO的命令强制切换. 测试用例的无非是包括了前提条件,测试步骤,期望结果,他们要求最好写出测试的目的,如果有多个用例的话. 我只写了两个简单的,分自动切,手动切两个CASE. 注意:自动切的时候,能触发自动切的条件应该都测试到.注意几点,主备是否切换成功,切换以后主板是否能正常工作,主备切换的时间是否满足设计要求,切换时业务的中断情况是否满足设计要求.倒回应该是必须要测试的.根据设备的具体情况,可以增加去备,去主,加备的CASE. 1.(6%) What is the output of the following program? #include int func(int x) { int count = 0; while(x) { count++; x=x&(x-1); } return count; } main() { printf(“%d”,func(9999)); } A. 8 B. 9 C. 10 D. 11 2.(6%) There is declaration int *p1, *p2, m=5, n; Then which of the following expression is correct? A. p1=&m; p2=&p1; B. p1=&m; p2=&n; *p1=*p2; C. p1=&m;p2=p1; D. P1=&m; *p2=*p1; 3.(6%) There is a two-dimension array a[3][3]. Which of the following expression cannot represent the address of element a[1][2]? A. &a[1][2] B. *(&a[1]+2) C. *(a=1)+2 D. a[1]+2 4.(6%) What is the output of the following program? #include void fn(int *b) { (*b)++; } int main() { int a=7; int b=4; fn(&a); printf(“%d”,a&&b); return 0; } A. 0 B. 1 C. 4 D. 7 5.(6%) What is the output of the following program? main() { int a[3][3], *p, I; p=a[0]; for(i=0; i<9; i++) { *(p+i) = i+1; } printf(“%d”,a[1][2]); } A. 2 B. 3 C. 5 D. 6 6(10%) Please write the macro “MIN(A,B)” this macro returns minimum value of the 2 parameters. And plese describe what will be happened if we run the below code: least=MIN(*p++,b); 7.(20%) Correct mistakes from code #include int CalculateVectorProduct(const short *A, int size A,const short *B,int size B, int *Res) { int I; /* loop counters*/ Res = (int *)malloc(sizeA*size of (int)); /*check that matrice production is possible*/ if (size A!=sizeB) { return -1;/*Vector size error*/ } for(i=0; i static char *olds; size_t function1 (s, accept) const char *s; const char *accept; { const char *p; const char *a; size_t count = 0; for (p=s; *p!=’/0’; ++p) { for (a= accept; *a!=’/0’; ++a) if (*p==*a) break; if (*a==’/0’) return count; else ++count; } return count; har *function2(s, accept) const char *s; const char *accept; while(*s !=’/0’) { const char *a=accept; while (*a !=’/0’) if (*a++ == *s) return(char *) s; ++s; } return NULL; } char * function3(s, delim) char *s; const char *delim; { char *token; if (s == NULL) s=olds; s+= function1 (s, delim); if (*s ==’/0’) { olds = s; return NULL; } return token; } int main(int arge, char *argv[]) { char s[ ]= *-abc-=-def=g*; char *str1; str1=function3(s,”-”); printf{“str1=%s/n”,str1}; str1=function3(NULL,”-=”); printf{“str1=%s/n”,str1}; str1=function3(NULL,”=”) printf{“str1=%s/n”,str1}; printf{“s=%s/n”,s}; return 0 } 9. (20%)Given a head pointer pointing to a linked list, please write a function that sort the list in increasing order. You are not allowed to use temporary array or memory copy. Typedef struct S_Node { int data; struct S_Node *next; }Node; Node*sort_link_list_increasing_order(Node *pheader); 2输出结果: y my mmy ummy Yummy 3.B AAL2可以为低速率,短的,可变长度且对时延敏感的分组提供高带宽利用率的数据传输,如B类业务。 AAL2 (ATM适配层2):AAL2用于端到端具有定时关系的,支持可变比特率的面向连接业务。并同时传送业务时钟信息缺点:它没有错误检测功能 AAL5 AAL5支持收发端之间没有时间同步要求的可变比特率业务,则适用于无连接的,可变速率的,无需在ATM信元上传输定时信息的业务,即D类业务优点: AAL5的优点是开销小、纠错强,特别适于可变比特率数据、支持面向连接及对时延不太敏感的业务传送。缺点:不支持复用功能,因而没有消息识别MID域 C. Example: 1. IP address spoofing, send requests to server with someone X’s IP address. 2. convert channel 3. IP fragment attacks Solution:抛弃基于地址的信任策略;进行包过滤;使用加密;使用随机化的初始序列号。 D. IP Qos的定义: IP Qos(Quality of Service)是指IP网络的一种能力,即在跨越多种底层网络技术(MP、FR、ATM、SDH等)的IP网络上,为特定的业务提供其所需要的服务。 IP Qos的优点: 1、有效控制网络资源及其使用; 2、为在单一IP网络上提供多种业务提供可能; 3、使得网络在提供诸如VPN等新型业务奠定了重要的基础; 4、能够在现有网络上细分客户,针对不同的客户需求提供差别业务; IP QoS可以用一系列可度量的参数来描述:(1)、业务可用性:连接的可靠性。(2)、延迟:(Latency),指两个参照点之间发送和接收数据包的时间间隔。(3)、可变延迟:也称为抖动(Jitter),指在同一条路由上发送的一组数据流中数据包之间的时间差异。(4)、吞吐量:网络中发送数据包的速率。(5)、丢包率:在网络中传输数据包时丢弃数据包的最高比率。 IP QoS 的体系结构三个网络模型——综合服务(IntServ)、区分服务(DiffServ)、多协议标签交换(MPLS)。 4.题目分析:存在三种特征:特征1.链接断开时间T<5s,链接可以恢复(the ongoing calls continue after fiber reconnection)特征2.链接断开时间T>8s,链接停止(the ongoing calls are terminated)特征3.链接断开时间5s<=T<=8s,链接停止概率为50%(the termination ratio of ongoing calls is 50%) Tool: The minimum break time of Fiber breaker的设置 是1s, 状态转换时间要0.1s(the turning unit is 0.1s),所以在设置中断时间的时候要考虑额外的状态转换时间。测试案例如下: Test case Break time setting Desired output Test 1 1s 特征1 Test 2 3s 特征1 Test 3 4.8s 特征1 Test 4 4.9s 特征3 Test 5 5s 特征3 Test 6 7.2s 特征3 Test 7 7.9s 特征3 Test 8 8s 特征2 Test 9 10.5s 特征2 Test 10 100s 特征2 只要设置的break time t+0.1s满足三种特性的条件即可。红色的为边界条件,是必需的。 5.A.协议方法:采用以太网协议,结合IEEE802.3x标准,网络传输层采用IP/UDP。 B. 流程,如后图 a. distributed-part 向 central 发送转发请求包,计时1s后来收到回复包*(或者其他可能情况),则执行重发。 b. central 收到转发请求包后,若系统空闲,则回复确认收到转发请求包,等待distributed 发送logs。若系统繁忙,回复系统正忙数据包。 C.dis收到回复包后,向central 发送logs 数据包,计时1s 后未收到确认回复,则重发该包,5次重发不成功则放弃本次发送。 d. central 收到logs 数据包后回复确认收到,交互完成。 C.数据报文格式: Bytes 2 2 2 2 2 2 n 2 字段内容 起始码 目的地址 发送地址 Centra 地址 功能码 长度 内容 CRC校验描述 FEAAH 1. 0001H 2. 0002H 3. 0003H 4. 0004H 无无 Logs 无

你可能感兴趣的:(Interview)