2014华为校园招聘试题答案(国外英文资料).doc

2014华为校园招聘试题答案(国外英文资料).doc

  1. 1、本文档共36页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
2014华为校园招聘试题答案(国外英文资料)

2014华为校园招聘试题答案(国外英文资料) 2014 HUAWEI campus recruitment exam questions and answers ======================================== 1 find the length of the last word in the string ******************************************************************* *hello *hello____word____ * ******************************************************************* #includestdio.h #includestring.h Void, main () { Char a[128]; Int b[128]; Int, m=0, n=0, len, I, j=0; Gets (a); Len=strlen (a); For (i=0; ilen; i++) { If (a[i]==) { B[j]=0; J++; } Else { B[j]=1; J++; } } For (j=0; jlen; j++) { If (b[j]==0) { N=0; } Else { N++; M=n; } } Printf (%d, m); } 2 a sequence of DNA consists of four letters of A/C/G/T. The ratio of G to C (defined as GC-Ratio) is the total number of occurrences of the two letters of the G and C in the sequence, divided by the total number of letters (that is, the length of the sequence). This proportion is very important in genetic engineering. Because high GC-Ratio may be the starting point of genes. Given a long DNA sequence and the minimum length required, researchers often need to find the highest subsequences in GC-Ratio. # include stdio.h # include string.h Void, main () { Char, a[256]={0}, b[256]={0}; Int, n=0, len=0, i=0, j=0, k=0, p=0, temp=0; Gets (a); Scanf (%d, n); Len=strlen (a); For (i=0; ilen-n+1; i++) { K=0; For (j=0; jn; j++) { If (a[i+j]==G||a[i+j]==C) { K++; } } If (tempk) { Temp=k; For (p=0; pn; p++) { B[p]=a[i+p]; } B[n]=\0; } } Printf (%s, B); } 3 output 7 numbers relating to numbers, including multiples of 7, and the number of 7 digits (such as 17, 27, 37, 70, 71, 72, 73,...) # include stdio.h Void, main () { Int, I, N, count=0; Int, a, B, C, D, e; Scanf (%d, n); Count=n/7; For (i=1; i=n; i++) { If (i%7==0) { ; } Else { E=i/10000; D= (i-e*10000) /1000; C= (i-e*10000-d*1000) /100; B= (i-e*10000-d*1000-c*100) /10; A= (i-e*10000-d*1000-c*100-b*10); If (7==a||7==b||7==c||7==d) { Count++; } } } Printf (%d, count); } 4 write a program that accepts a string with le

文档评论(0)

f8r9t5c + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

版权声明书
用户编号:8000054077000003

1亿VIP精品文档

相关文档