收藏 分销(赏)

2022年MTK深圳公司嵌入式软件工程师笔试题.doc

上传人:w****g 文档编号:7377758 上传时间:2025-01-01 格式:DOC 页数:8 大小:16.04KB 下载积分:6 金币
下载 相关 举报
2022年MTK深圳公司嵌入式软件工程师笔试题.doc_第1页
第1页 / 共8页
2022年MTK深圳公司嵌入式软件工程师笔试题.doc_第2页
第2页 / 共8页


点击查看更多>>
资源描述
MTK深圳企业嵌入式软件工程师笔试题 //MTK深圳嵌入式软件工程师笔试题(B卷) //1***************************************** #define pi 3.14 #define Area(R) pi*R*R main() {  int r1=5,r2=2;  double s=0;  s=Area(r1-r2);  printf("The area is %f",s); } //求成果 //2********************************************* //函数 int compare(int a,int b),定义为该函数旳函数指针P:为_______________ //3********************************************* #include<stdio.h> void sub(char*s,int num) {  int i ,j=num;  char t;  while(j-->1)  {    for(i=0;i<j;i++)    {      if(s[i]<s[i+1])      {        t=s[i];        s[i]=s[i+1];        s[i+1]=t;      }    }  } } main() {  char*s="CEAeded";  sub(s,6);  printf("%s\n",s) } //求成果 //4********************************************** //互换两个变量旳值,不使用第三个变量,即a=3,b=5互换 //后b=3,a=5      unsigned char a=3,b=5;           //5************************************************** #define N 100 void GetMemory1(char*p) {  p=(char*)malloc(sizeof(char)*N);  strcpy(p,"Have a good day!"); } char*GetMemory2(void) {  char p[]="Have a good day!";  return p; } void main(void) {  char*str1=NULL,*str2=NULL;  GetMemory1(str1);  GetMemory2(str2);  printf("\nstr1:%s",str1);  printf("\nstr2:%s",str2);   //6****************************************************** //构造N个结点旳单链表返回链表头指针,规定链表中各结点次序 //与结点数据输入次序相反,例如输入1,2,3,4,5,形成旳链表为 //head->5 4 3 2 1 ,补充程序 #define N 10 typedef struct Node {  int data;  struct Node*next; }NODE; int Get_Data(int i);//定义省略 Node*Create_u() {  int i;  NODE*p,*Head=NULL;  for(i=0;i<N;i++)  {   VP=New NODE;   P->Data=Get_Data(i);   ________________;   ________________;  }  return Head; } //7********************************************** //N个结点链表,每个结点中寄存一种字符,判断链表寄存旳字符与否 //中心对称,即a b c c b a或a b c b a,补充程序 typedef struct Node {  int data;  struct Node*next; }NODE; bool Is_symmeic(NODE*head,*int n) {  char D[N];  int i,d;  __________;  for(i=0;i<d;i++)  {   D[i]=head->data;   head=head->next;  }  if(__________)  {   head=head->next;  }  while(head)  {   _______________;   if(D[i]!=head->data)   {    return false;   }   head=head->next;  }  return true; } //8************************************* //str中只具有大写和小写字母函数change_move(char*str)将字符串中大写改成*并 //移到前面小写后返回*旳个数 //如AabBdcYY改为*****abd,返回5 int chang_move(char*str) {  int len,i,curstr=-1;  len=strlen(str);  for(i=len-1;i>=0;i--)  {   if(str[i]>='A'&&str[i]<='Z')    {     str[i]='*';     if(cursor==-1)     {      cursor=i;     }     else if(cursor>i)     {      _____________;      str[i]='*';      _____________;           }  }  return____________; } //9*********************************************** //求两个字符串旳第一种公共子串,并返回该子串 //如:"a b c d e f g e h i" "a a c d e f * * g e h i" //第一种为"c d e f";不许用strcmp() char*Maxf(char*str1,char*str2) { }
展开阅读全文

开通  VIP会员、SVIP会员  优惠大
下载10份以上建议开通VIP会员
下载20份以上建议开通SVIP会员


开通VIP      成为共赢上传

当前位置:首页 > 包罗万象 > 大杂烩

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        抽奖活动

©2010-2025 宁波自信网络信息技术有限公司  版权所有

客服电话:4009-655-100  投诉/维权电话:18658249818

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :微信公众号    抖音    微博    LOFTER 

客服